summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorAmaury Sechet <deadalnix@gmail.com>2016-02-11 21:37:54 +0000
committerAmaury Sechet <deadalnix@gmail.com>2016-02-11 21:37:54 +0000
commit2f43208c9a5564fa9e13fe72082099322fd5e426 (patch)
treec05ee12d6886db4ab0085eaa64c65bdc7159e3c4 /llvm/lib/IR
parent2580901461d06db2da15d4748c2de1fe79fc4d63 (diff)
downloadbcm5719-llvm-2f43208c9a5564fa9e13fe72082099322fd5e426.tar.gz
bcm5719-llvm-2f43208c9a5564fa9e13fe72082099322fd5e426.zip
Add support for phi nodes in the LLVM C API test
Summary: This required to add binding to Instruction::removeFromParent so that instruction can be forward declared and then moved at the right place. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17057 llvm-svn: 260597
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/Core.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index 8093bb55e9d..d3abe0b9262 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/lib/IR/Core.cpp
@@ -2005,6 +2005,10 @@ LLVMValueRef LLVMGetPreviousInstruction(LLVMValueRef Inst) {
return wrap(&*--I);
}
+void LLVMInstructionRemoveFromParent(LLVMValueRef Inst) {
+ unwrap<Instruction>(Inst)->removeFromParent();
+}
+
void LLVMInstructionEraseFromParent(LLVMValueRef Inst) {
unwrap<Instruction>(Inst)->eraseFromParent();
}
OpenPOWER on IntegriCloud