[llvm] [llvm-c] Add getters for LLVMContextRef for various types (PR #99087)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 12:44:04 PDT 2024


================
@@ -3434,6 +3441,13 @@ void LLVMMoveBasicBlockBefore(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos);
  */
 void LLVMMoveBasicBlockAfter(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos);
 
+/**
+ * Obtain the context to which this basic block is associated.
+ *
+ * @see llvm::Module::getContext()
+ */
+LLVMContextRef LLVMGetBasicBlockContext(LLVMBasicBlockRef BB);
----------------
nikic wrote:

This shouldn't be needed. A BasicBlock is also a Value.

https://github.com/llvm/llvm-project/pull/99087


More information about the llvm-commits mailing list