Skip to content

Commit 3be6916

Browse files
fsfodtstellar
andauthored
Add symbol visibility macros to abi-breaking.h.cmake (#110898)
Annotating these symbols will fix missing symbols errors for Bugpoint when when the default symbol visibility is set to hidden for LLVM. This is part of the work to enable LLVM_BUILD_LLVM_DYLIB and plugins on window. Co-authored-by: Tom Stellard <[email protected]>
1 parent fb2960a commit 3be6916

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/include/llvm/Config/abi-breaking.h.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#ifndef LLVM_ABI_BREAKING_CHECKS_H
1313
#define LLVM_ABI_BREAKING_CHECKS_H
1414

15+
#include "llvm/Support/Compiler.h"
16+
1517
/* Define to enable checks that alter the LLVM C++ ABI */
1618
#cmakedefine01 LLVM_ENABLE_ABI_BREAKING_CHECKS
1719

@@ -43,12 +45,12 @@
4345
#endif
4446
namespace llvm {
4547
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
46-
extern int EnableABIBreakingChecks;
48+
LLVM_ABI extern int EnableABIBreakingChecks;
4749
LLVM_HIDDEN_VISIBILITY
4850
__attribute__((weak)) int *VerifyEnableABIBreakingChecks =
4951
&EnableABIBreakingChecks;
5052
#else
51-
extern int DisableABIBreakingChecks;
53+
LLVM_ABI extern int DisableABIBreakingChecks;
5254
LLVM_HIDDEN_VISIBILITY
5355
__attribute__((weak)) int *VerifyDisableABIBreakingChecks =
5456
&DisableABIBreakingChecks;

0 commit comments

Comments
 (0)