Skip to content

Commit 9926619

Browse files
[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 <[email protected]>
1 parent f18536d commit 9926619

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/include/mlir/IR/Value.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ struct TypedValue : Value {
443443
static bool classof(Value value) { return llvm::isa<Ty>(value.getType()); }
444444

445445
/// Return the known Type
446-
Ty getType() { return llvm::cast<Ty>(Value::getType()); }
446+
Ty getType() const { return llvm::cast<Ty>(Value::getType()); }
447447
void setType(Ty ty) { Value::setType(ty); }
448448
};
449449

0 commit comments

Comments
 (0)