From d0cb5b2886403ffc4a657125059b9aa786b0253e Mon Sep 17 00:00:00 2001 From: Paul Ohlhauser Date: Fri, 17 May 2024 00:12:13 +0200 Subject: [PATCH 1/3] 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; From f0affb01f144e5b6b90ec8b2370236e0f466d269 Mon Sep 17 00:00:00 2001 From: Paul Ohlhauser Date: Thu, 29 May 2025 17:39:16 +0200 Subject: [PATCH 2/3] Included macro --- llvm/include/llvm-c/ExecutionEngine.h | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/include/llvm-c/ExecutionEngine.h b/llvm/include/llvm-c/ExecutionEngine.h index 51a758121deac..fcd2583eae075 100644 --- a/llvm/include/llvm-c/ExecutionEngine.h +++ b/llvm/include/llvm-c/ExecutionEngine.h @@ -23,6 +23,7 @@ #include "llvm-c/Target.h" #include "llvm-c/TargetMachine.h" #include "llvm-c/Types.h" +#include "llvm/Support/Compiler.h" LLVM_C_EXTERN_C_BEGIN From 86923cfb261c5a84589d6914f57e5fd37b072a84 Mon Sep 17 00:00:00 2001 From: Paul Ohlhauser Date: Thu, 5 Jun 2025 18:53:21 +0200 Subject: [PATCH 3/3] Reverted back to explanatory comments --- llvm/include/llvm-c/ExecutionEngine.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/llvm/include/llvm-c/ExecutionEngine.h b/llvm/include/llvm-c/ExecutionEngine.h index fcd2583eae075..2062cbf470d8b 100644 --- a/llvm/include/llvm-c/ExecutionEngine.h +++ b/llvm/include/llvm-c/ExecutionEngine.h @@ -23,7 +23,6 @@ #include "llvm-c/Target.h" #include "llvm-c/TargetMachine.h" #include "llvm-c/Types.h" -#include "llvm/Support/Compiler.h" LLVM_C_EXTERN_C_BEGIN @@ -36,14 +35,14 @@ LLVM_C_EXTERN_C_BEGIN /** * Empty function used to force the linker to link MCJIT. - * Hidden because it does not apply to the dylib interface. + * Has no effect when called on a pre-built library (dylib interface). */ -LLVM_ATTRIBUTE_VISIBILITY_HIDDEN void LLVMLinkInMCJIT(void); +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. + * Has no effect when called on a pre-built library (dylib interface). */ -LLVM_ATTRIBUTE_VISIBILITY_HIDDEN void LLVMLinkInInterpreter(void); +void LLVMLinkInInterpreter(void); typedef struct LLVMOpaqueGenericValue *LLVMGenericValueRef; typedef struct LLVMOpaqueExecutionEngine *LLVMExecutionEngineRef;