From 2f43208c9a5564fa9e13fe72082099322fd5e426 Mon Sep 17 00:00:00 2001 From: Amaury Sechet Date: Thu, 11 Feb 2016 21:37:54 +0000 Subject: 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 --- llvm/lib/IR/Core.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/IR') 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(Inst)->removeFromParent(); +} + void LLVMInstructionEraseFromParent(LLVMValueRef Inst) { unwrap(Inst)->eraseFromParent(); } -- cgit v1.2.3