Skip to content

Commit 5f91d2f

Browse files
committed
[llvm] add a new LLVM_ABI_FOR_TESTS macro for private symbols
1 parent 62f8377 commit 5f91d2f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/include/llvm/Support/Compiler.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@
171171
/// for both functions and classes. On windows its turned in to dllimport for
172172
/// library consumers, for other platforms its a default visibility attribute.
173173
///
174+
/// LLVM_ABI_FOR_TEST is for annotating symbols that are only exported because
175+
/// they are imported from a test. These symbols are not technically part of the
176+
/// LLVM public interface and could be conditionally excluded when not building
177+
/// tests in the future.
178+
///
174179
#ifndef LLVM_ABI_GENERATING_ANNOTATIONS
175180
// Marker to add to classes or functions in public headers that should not have
176181
// export macros added to them by the clang tool
@@ -210,6 +215,7 @@
210215
#define LLVM_EXPORT_TEMPLATE
211216
#define LLVM_ABI_EXPORT
212217
#endif
218+
#define LLVM_ABI_FOR_TEST LLVM_ABI
213219
#endif
214220

215221
#if defined(__GNUC__)

0 commit comments

Comments
 (0)