Skip to content

Commit bf2a9fe

Browse files
fsfodvgvassilev
authored andcommitted
[Clang][ASTMatchers] Add visibility macros to variables declared by macros
This will fix missing symbols for ASTMatchersTests on windows when building with CLANG_LINK_CLANG and explicit visibility macros are used. This is part of the work to enable LLVM_BUILD_LLVM_DYLIB and LLVM\Clang plugins on window.
1 parent 39ac8b2 commit bf2a9fe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang/include/clang/ASTMatchers/ASTMatchersMacros.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
#ifndef LLVM_CLANG_ASTMATCHERS_ASTMATCHERSMACROS_H
5050
#define LLVM_CLANG_ASTMATCHERS_ASTMATCHERSMACROS_H
5151

52+
#include "clang/Support/Compiler.h"
53+
5254
/// AST_MATCHER_FUNCTION(ReturnType, DefineMatcher) { ... }
5355
/// defines a zero parameter function named DefineMatcher() that returns a
5456
/// ReturnType object.
@@ -367,7 +369,7 @@
367369
static QualType (T::*value())() const { return &T::FunctionName; } \
368370
}; \
369371
} \
370-
extern const ::clang::ast_matchers::internal:: \
372+
CLANG_ABI extern const ::clang::ast_matchers::internal:: \
371373
TypeTraversePolymorphicMatcher< \
372374
QualType, \
373375
::clang::ast_matchers::internal::TypeMatcher##MatcherName##Getter, \
@@ -407,7 +409,7 @@
407409
static TypeLoc (T::*value())() const { return &T::FunctionName##Loc; } \
408410
}; \
409411
} \
410-
extern const ::clang::ast_matchers::internal:: \
412+
CLANG_ABI extern const ::clang::ast_matchers::internal:: \
411413
TypeTraversePolymorphicMatcher< \
412414
TypeLoc, \
413415
::clang::ast_matchers::internal:: \

0 commit comments

Comments
 (0)