[CIR][NFC] Remove redundant pointer casts (#139898)
This mirrors incubator changes from https://github.com/llvm/clangir/pull/1609
diff --git a/clang/include/clang/CIR/Dialect/IR/CIROps.td b/clang/include/clang/CIR/Dialect/IR/CIROps.td
index 9f5fa26..e08f372 100644
--- a/clang/include/clang/CIR/Dialect/IR/CIROps.td
+++ b/clang/include/clang/CIR/Dialect/IR/CIROps.td
@@ -269,7 +269,7 @@
let extraClassDeclaration = [{
// Get type pointed by the base pointer.
mlir::Type getElementTy() {
- return mlir::cast<cir::PointerType>(getBase().getType()).getPointee();
+ return getBase().getType().getPointee();
}
}];
}
@@ -1710,7 +1710,7 @@
/// Return the result type.
cir::PointerType getResultTy() {
- return mlir::cast<cir::PointerType>(getResult().getType());
+ return getResult().getType();
}
}];