[mlir] Make Type::print and Type::dump const

This commit is contained in:
Robert David 2021-06-16 15:31:20 -07:00 committed by Fangrui Song
parent a127dffc49
commit 7cfb7a67c5
2 changed files with 4 additions and 4 deletions

View File

@ -156,8 +156,8 @@ public:
bool isIntOrIndexOrFloat() const;
/// Print the current type.
void print(raw_ostream &os);
void dump();
void print(raw_ostream &os) const;
void dump() const;
friend ::llvm::hash_code hash_value(Type arg);

View File

@ -2697,9 +2697,9 @@ void Attribute::dump() const {
llvm::errs() << "\n";
}
void Type::print(raw_ostream &os) { ModulePrinter(os).printType(*this); }
void Type::print(raw_ostream &os) const { ModulePrinter(os).printType(*this); }
void Type::dump() { print(llvm::errs()); }
void Type::dump() const { print(llvm::errs()); }
void AffineMap::dump() const {
print(llvm::errs());