[llvm] [llvm-c] Deprecate functions working on the global context (PR #163979)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 20 09:20:24 PDT 2025
================
@@ -581,6 +581,9 @@ LLVM_C_ABI LLVMContextRef LLVMContextCreate(void);
/**
* Obtain the global context instance.
+ *
+ * Use of the global context is deprecated. Use LLVMContextCreate() and
+ * context-aware functions instead.
*/
LLVM_C_ABI LLVMContextRef LLVMGetGlobalContext(void);
----------------
arichardson wrote:
Could we conditionally deprecate this based on a `#ifndef BUILDING_LLVM_C_API` or similar macro that is defined in the one source file that needs to use it?
https://github.com/llvm/llvm-project/pull/163979
More information about the llvm-commits
mailing list