[llvm] c66eb25 - [OCaml] Fix build

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 9 08:00:58 PST 2025


Author: Nikita Popov
Date: 2025-12-09T17:00:45+01:00
New Revision: c66eb25459279ce7663bcd51eabaeeffafae0366

URL: https://github.com/llvm/llvm-project/commit/c66eb25459279ce7663bcd51eabaeeffafae0366
DIFF: https://github.com/llvm/llvm-project/commit/c66eb25459279ce7663bcd51eabaeeffafae0366.diff

LOG: [OCaml] Fix build

Fix a mistake introduced in https://github.com/llvm/llvm-project/pull/163979:

We should stick with the deprecated LLVMGetGlobalContext() API
in this file, as getGlobalContextForCAPI() is a C++ API that is
not available here.

Added: 
    

Modified: 
    llvm/bindings/ocaml/llvm/llvm_ocaml.c

Removed: 
    


################################################################################
diff  --git a/llvm/bindings/ocaml/llvm/llvm_ocaml.c b/llvm/bindings/ocaml/llvm/llvm_ocaml.c
index 53158c88be19c..a2d948033724c 100644
--- a/llvm/bindings/ocaml/llvm/llvm_ocaml.c
+++ b/llvm/bindings/ocaml/llvm/llvm_ocaml.c
@@ -240,7 +240,7 @@ value llvm_dispose_context(value C) {
 
 /* unit -> llcontext */
 value llvm_global_context(value Unit) {
-  return to_val(getGlobalContextForCAPI());
+  return to_val(LLVMGetGlobalContext());
 }
 
 /* llcontext -> string -> int */


        


More information about the llvm-commits mailing list