[llvm] Added clarifying comment to 'LLVMLinkInMCJIT' and 'LLVMLinkInInterpreter' (PR #92467)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 15 16:53:49 PDT 2025


https://github.com/Minding000 updated https://github.com/llvm/llvm-project/pull/92467

>From d0cb5b2886403ffc4a657125059b9aa786b0253e Mon Sep 17 00:00:00 2001
From: Paul Ohlhauser <bendix.ohlhauser at gmail.com>
Date: Fri, 17 May 2024 00:12:13 +0200
Subject: [PATCH] Changed link function visibility to hidden and added comments

---
 llvm/include/llvm-c/ExecutionEngine.h | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/llvm/include/llvm-c/ExecutionEngine.h b/llvm/include/llvm-c/ExecutionEngine.h
index c5fc9bdb4d07f..51a758121deac 100644
--- a/llvm/include/llvm-c/ExecutionEngine.h
+++ b/llvm/include/llvm-c/ExecutionEngine.h
@@ -33,8 +33,16 @@ LLVM_C_EXTERN_C_BEGIN
  * @{
  */
 
-void LLVMLinkInMCJIT(void);
-void LLVMLinkInInterpreter(void);
+/**
+ * Empty function used to force the linker to link MCJIT.
+ * Hidden because it does not apply to the dylib interface.
+ */
+LLVM_ATTRIBUTE_VISIBILITY_HIDDEN void LLVMLinkInMCJIT(void);
+/**
+ * Empty function used to force the linker to link the LLVM interpreter.
+ * Hidden because it does not apply to the dylib interface.
+ */
+LLVM_ATTRIBUTE_VISIBILITY_HIDDEN void LLVMLinkInInterpreter(void);
 
 typedef struct LLVMOpaqueGenericValue *LLVMGenericValueRef;
 typedef struct LLVMOpaqueExecutionEngine *LLVMExecutionEngineRef;



More information about the llvm-commits mailing list