[llvm] [llvm-c] Deprecate functions working on the global context (PR #163979)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 11:01:24 PST 2025


================
@@ -37,14 +38,19 @@ LLVM_C_EXTERN_C_BEGIN
    Optionally returns a human-readable error message via OutMessage.
 
    This is deprecated. Use LLVMParseBitcode2. */
-LLVM_C_ABI LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf,
-                                     LLVMModuleRef *OutModule,
-                                     char **OutMessage);
+LLVM_C_ABI LLVM_ATTRIBUTE_C_DEPRECATED(
----------------
rnk wrote:

Does our deprecation attribute really need to be a function-style macro? This is IMO really ugly, and I think the C API headers should try to be really clean. It might be worth digging into the implementation to better understand if this is really still needed, or if we can get by with a single macro identifier somewhere in the declaration.

Maybe making deprecated APIs ugly is fine.

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


More information about the llvm-commits mailing list