diff options
-rw-r--r-- | include/llvm-c/Core.h | 1 | ||||
-rw-r--r-- | lib/VMCore/Core.cpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h index baea5ab..84ddfbc 100644 --- a/include/llvm-c/Core.h +++ b/include/llvm-c/Core.h @@ -776,6 +776,7 @@ LLVMValueRef LLVMGetLastInstruction(LLVMBasicBlockRef BB); LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst); LLVMValueRef LLVMGetNextInstruction(LLVMValueRef Inst); LLVMValueRef LLVMGetPreviousInstruction(LLVMValueRef Inst); +void LLVMInstructionEraseFromParent(LLVMValueRef Inst); /* Operations on call sites */ void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC); diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 42896dd..e2b659b 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -1508,6 +1508,10 @@ LLVMValueRef LLVMGetPreviousInstruction(LLVMValueRef Inst) { return wrap(--I); } +void LLVMInstructionEraseFromParent(LLVMValueRef Inst) { + unwrap<Instruction>(Inst)->eraseFromParent(); +} + /*--.. Call and invoke instructions ........................................--*/ unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr) { |