[mlir] Make TypedValue::getType() const (#76568)

The TypedValue::getType() essentially forwards the return value of
Value::getType() which is a const method. Somehow, at TypedValue level
the method's constness is lost, so restore it.

Originally done by: Nikita Kudriavtsev <nikita.kudriavtsev@intel.com>
This commit is contained in:
Andrei Golubev 2024-01-01 22:43:18 +02:00 committed by GitHub
parent f18536d642
commit 992661922a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -443,7 +443,7 @@ struct TypedValue : Value {
static bool classof(Value value) { return llvm::isa<Ty>(value.getType()); }
/// Return the known Type
Ty getType() { return llvm::cast<Ty>(Value::getType()); }
Ty getType() const { return llvm::cast<Ty>(Value::getType()); }
void setType(Ty ty) { Value::setType(ty); }
};