[llvm] [SandboxIR] Implement AllocaInst (PR #102027)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 10:04:27 PDT 2024


================
@@ -1393,6 +1396,108 @@ class GetElementPtrInst final : public Instruction {
 #endif
 };
 
+class AllocaInst final : public UnaryInstruction {
+  Use getOperandUseInternal(unsigned OpIdx, bool Verify) const final {
+    return getOperandUseDefault(OpIdx, Verify);
+  }
+  SmallVector<llvm::Instruction *, 1> getLLVMInstrs() const final {
+    return {cast<llvm::Instruction>(Val)};
+  }
+
+public:
+  AllocaInst(llvm::AllocaInst *AI, Context &Ctx)
----------------
vporpo wrote:

Good catch, yes this should be private.

https://github.com/llvm/llvm-project/pull/102027


More information about the llvm-commits mailing list