[llvm] [SandboxIR] Implement ConstantExpr (PR #109491)
Sriraman Tallam via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 16:30:19 PDT 2024
================
@@ -1661,6 +1663,19 @@ class ConstantPtrAuth final : public Constant {
}
};
+class ConstantExpr : public Constant {
+ ConstantExpr(llvm::ConstantExpr *C, Context &Ctx)
+ : Constant(ClassID::ConstantExpr, C, Ctx) {}
+ friend class Context; // For constructor.
+
+public:
+ /// For isa/dyn_cast.
+ static bool classof(const sandboxir::Value *From) {
+ return From->getSubclassID() == ClassID::ConstantExpr;
+ }
+ // TODO: Missing functions.
----------------
tmsri wrote:
Why not add the missing functions or a subset that is needed for now? How is this useful?
https://github.com/llvm/llvm-project/pull/109491
More information about the llvm-commits
mailing list