[llvm-commits] [llvm] r141023 - in /llvm/trunk: include/llvm-c/Core.h lib/VMCore/Core.cpp
Devang Patel
dpatel at apple.com
Mon Oct 3 13:59:18 PDT 2011
Author: dpatel
Date: Mon Oct 3 15:59:18 2011
New Revision: 141023
URL: http://llvm.org/viewvc/llvm-project?rev=141023&view=rev
Log:
Add C api for Instruction->eraseFromParent().
Modified:
llvm/trunk/include/llvm-c/Core.h
llvm/trunk/lib/VMCore/Core.cpp
Modified: llvm/trunk/include/llvm-c/Core.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=141023&r1=141022&r2=141023&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/Core.h (original)
+++ llvm/trunk/include/llvm-c/Core.h Mon Oct 3 15:59:18 2011
@@ -776,6 +776,7 @@
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);
Modified: llvm/trunk/lib/VMCore/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Core.cpp?rev=141023&r1=141022&r2=141023&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Core.cpp (original)
+++ llvm/trunk/lib/VMCore/Core.cpp Mon Oct 3 15:59:18 2011
@@ -1508,6 +1508,10 @@
return wrap(--I);
}
+void LLVMInstructionEraseFromParent(LLVMValueRef Inst) {
+ unwrap<Instruction>(Inst)->eraseFromParent();
+}
+
/*--.. Call and invoke instructions ........................................--*/
unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr) {
More information about the llvm-commits
mailing list