summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c/Core.h
diff options
context:
space:
mode:
authorRobert Widmann <devteam.codafi@gmail.com>2019-04-05 20:32:43 +0000
committerRobert Widmann <devteam.codafi@gmail.com>2019-04-05 20:32:43 +0000
commitb4baa5602d15f59a11927832cfd4e6592fabd281 (patch)
treea209d3b29d5ade3e81565eb140567ffea2632e49 /llvm/include/llvm-c/Core.h
parent6e68a79110cbcac6211d5157079c961e889ef3fd (diff)
downloadbcm5719-llvm-b4baa5602d15f59a11927832cfd4e6592fabd281.tar.gz
bcm5719-llvm-b4baa5602d15f59a11927832cfd4e6592fabd281.zip
[LLVM-C] Add bindings to insert basic blocks
Summary: Now that we can create standalone basic blocks, it's useful to be able to append them. Add bindings to - Insert a basic block after the current insertion block - Append a basic block to the end of a function's list of basic blocks Reviewers: whitequark, deadalnix, harlanhaskins Reviewed By: whitequark, harlanhaskins Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59658 llvm-svn: 357812
Diffstat (limited to 'llvm/include/llvm-c/Core.h')
-rw-r--r--llvm/include/llvm-c/Core.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index 393250f7f8c..6adb4d80011 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/include/llvm-c/Core.h
@@ -2917,6 +2917,24 @@ LLVMBasicBlockRef LLVMGetPreviousBasicBlock(LLVMBasicBlockRef BB);
LLVMBasicBlockRef LLVMGetEntryBasicBlock(LLVMValueRef Fn);
/**
+ * Insert the given basic block after the insertion point of the given builder.
+ *
+ * The insertion point must be valid.
+ *
+ * @see llvm::Function::BasicBlockListType::insertAfter()
+ */
+void LLVMInsertExistingBasicBlockAfterInsertBlock(LLVMBuilderRef Builder,
+ LLVMBasicBlockRef BB);
+
+/**
+ * Append the given basic block to the basic block list of the given function.
+ *
+ * @see llvm::Function::BasicBlockListType::push_back()
+ */
+void LLVMAppendExistingBasicBlock(LLVMValueRef Fn,
+ LLVMBasicBlockRef BB);
+
+/**
* Create a new basic block without inserting it into a function.
*
* @see llvm::BasicBlock::Create()
OpenPOWER on IntegriCloud