llvm.org GIT mirror llvm / c0aec7f
Revert "Add link-time detection of LLVM_ABI_BREAKING_CHECKS mismatch" This reverts commit r287352, LLDB CI is broken. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287374 91177308-0d34-0410-b5e6-96231b3b80d8 Mehdi Amini 3 years ago
2 changed file(s) with 0 addition(s) and 37 deletion(s). Raw diff Collapse all Expand all
7979 /* LLVM version string */
8080 #define LLVM_VERSION_STRING "${PACKAGE_VERSION}"
8181
82 // ABI_BREAKING_CHECKS protection: provides link-time failure when clients build
83 // mismatch with LLVM
84 #if defined(_MSC_VER)
85 // Use pragma with MSVC
86 #define LLVM_XSTR(s) LLVM_STR(s)
87 #define LLVM_STR(s) #s
88 #pragma detect_mismatch("LLVM_ENABLE_ABI_BREAKING_CHECKS", LLVM_XSTR(LLVM_ENABLE_ABI_BREAKING_CHECKS))
89 #undef LLVM_XSTR
90 #undef LLVM_STR
91 #elif defined(__cplusplus)
92 namespace llvm {
93 #if LLVM_ENABLE_ABI_BREAKING_CHECKS
94 extern int EnableABIBreakingChecks;
95 __attribute__((weak, visibility ("hidden"))) int *VerifyEnableABIBreakingChecks = &EnableABIBreakingChecks;
96 #else
97 extern int DisableABIBreakingChecks;
98 __attribute__((weak, visibility ("hidden"))) int *VerifyDisableABIBreakingChecks = &DisableABIBreakingChecks;
9982 #endif
100 }
101 #endif // _MSC_VER
102
103 #endif
111111 }
112112
113113 }
114
115
116 #ifndef _MSC_VER
117 namespace llvm {
118
119 // One of these two variables will be referenced by a symbol defined in
120 // llvm-config.h. We provide a link-time (or load time for DSO) failure when
121 // there is a mismatch in the build configuration of the API client and LLVM.
122 #if LLVM_ENABLE_ABI_BREAKING_CHECKS
123 int EnableABIBreakingChecks;
124 #else
125 int DisableABIBreakingChecks;
126 #endif
127
128 } // end namespace llvm
129 #endif