[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 1 10:16:59 PDT 2025
================
@@ -291,6 +291,21 @@ def CIR_ConstantOp : CIR_Op<"const", [
return ptrAttr.isNullValue();
return false;
}
+
+ template <typename T>
+ T getValueAttr() { return mlir::dyn_cast<T>(getValue()); }
+
+ llvm::APInt getIntValue() {
----------------
xlauko wrote:
They are in not upstreamed parts of this PR in the incubator, I will drop them for now.
https://github.com/llvm/llvm-project/pull/151216
More information about the cfe-commits
mailing list