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

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 09:54:22 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)
----------------
aeubanks wrote:

I thought this was supposed to be private

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


More information about the llvm-commits mailing list