[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 {
----------------
aeubanks wrote:

perhaps we should have a helper `SingleLLVMInstructionImpl` helper class for these that you can inherit from

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


More information about the llvm-commits mailing list