Skip to content

Commit 42360a8

Browse files
committed
Auto generated visibility macros for clang internal headers that are needed by tests
1 parent 2b31ba8 commit 42360a8

File tree

11 files changed

+43
-27
lines changed

11 files changed

+43
-27
lines changed

clang/lib/AST/ByteCode/FunctionPointer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111

1212
#include "Function.h"
1313
#include "Primitives.h"
14+
#include "clang/Support/Compiler.h"
1415

1516
namespace clang {
1617
class ASTContext;
1718
class APValue;
1819
namespace interp {
1920

20-
class FunctionPointer final {
21+
class CLANG_ABI FunctionPointer final {
2122
private:
2223
const Function *Func;
2324
uint64_t Offset;

clang/lib/AST/ByteCode/MemberPointer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define LLVM_CLANG_AST_INTERP_MEMBER_POINTER_H
1111

1212
#include "Pointer.h"
13+
#include "clang/Support/Compiler.h"
1314
#include <optional>
1415

1516
namespace clang {
@@ -19,7 +20,7 @@ namespace interp {
1920
class Context;
2021
class FunctionPointer;
2122

22-
class MemberPointer final {
23+
class CLANG_ABI MemberPointer final {
2324
private:
2425
Pointer Base;
2526
const ValueDecl *Dcl = nullptr;

clang/lib/AST/ByteCode/Pointer.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "clang/AST/Decl.h"
2121
#include "clang/AST/DeclCXX.h"
2222
#include "clang/AST/Expr.h"
23+
#include "clang/Support/Compiler.h"
2324
#include "llvm/Support/raw_ostream.h"
2425

2526
namespace clang {
@@ -41,7 +42,7 @@ struct BlockPointer {
4142
unsigned Base;
4243
};
4344

44-
struct IntPointer {
45+
struct CLANG_ABI IntPointer {
4546
const Descriptor *Desc;
4647
uint64_t Value;
4748

@@ -80,7 +81,7 @@ enum class Storage { Block, Int, Fn };
8081
/// │
8182
/// │
8283
/// Base
83-
class Pointer {
84+
class CLANG_ABI Pointer {
8485
private:
8586
static constexpr unsigned PastEndMark = ~0u;
8687
static constexpr unsigned RootPtrMark = ~0u;

clang/lib/AST/ByteCode/Program.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "PrimType.h"
1919
#include "Record.h"
2020
#include "Source.h"
21+
#include "clang/Support/Compiler.h"
2122
#include "llvm/ADT/DenseMap.h"
2223
#include "llvm/ADT/PointerUnion.h"
2324
#include "llvm/ADT/StringRef.h"
@@ -36,7 +37,7 @@ namespace interp {
3637
class Context;
3738

3839
/// The program contains and links the bytecode for all functions.
39-
class Program final {
40+
class CLANG_ABI Program final {
4041
public:
4142
Program(Context &Ctx) : Ctx(Ctx) {}
4243

clang/lib/Format/FormatToken.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "clang/Basic/OperatorPrecedence.h"
2020
#include "clang/Format/Format.h"
2121
#include "clang/Lex/Lexer.h"
22+
#include "clang/Support/Compiler.h"
2223
#include <unordered_set>
2324

2425
namespace clang {
@@ -219,7 +220,7 @@ enum TokenType : uint8_t {
219220
};
220221

221222
/// Determines the name of a token type.
222-
const char *getTokenTypeName(TokenType Type);
223+
CLANG_ABI const char *getTokenTypeName(TokenType Type);
223224

224225
// Represents what type of block a set of braces open.
225226
enum BraceBlockKind { BK_Unknown, BK_Block, BK_BracedInit };
@@ -296,7 +297,7 @@ class AnnotatedLine;
296297

297298
/// A wrapper around a \c Token storing information about the
298299
/// whitespace characters preceding it.
299-
struct FormatToken {
300+
struct CLANG_ABI FormatToken {
300301
FormatToken()
301302
: HasUnescapedNewline(false), IsMultiline(false), IsFirst(false),
302303
MustBreakBefore(false), MustBreakBeforeFinalized(false),
@@ -930,7 +931,7 @@ struct FormatToken {
930931
class ContinuationIndenter;
931932
struct LineState;
932933

933-
class TokenRole {
934+
class CLANG_ABI TokenRole {
934935
public:
935936
TokenRole(const FormatStyle &Style) : Style(Style) {}
936937
virtual ~TokenRole();
@@ -968,7 +969,7 @@ class TokenRole {
968969
const FormatStyle &Style;
969970
};
970971

971-
class CommaSeparatedList : public TokenRole {
972+
class CLANG_ABI CommaSeparatedList : public TokenRole {
972973
public:
973974
CommaSeparatedList(const FormatStyle &Style)
974975
: TokenRole(Style), HasNestedBracedList(false) {}
@@ -1980,7 +1981,8 @@ inline bool continuesLineComment(const FormatToken &FormatTok,
19801981
}
19811982

19821983
// Returns \c true if \c Current starts a new parameter.
1983-
bool startsNextParameter(const FormatToken &Current, const FormatStyle &Style);
1984+
CLANG_ABI bool startsNextParameter(const FormatToken &Current,
1985+
const FormatStyle &Style);
19841986

19851987
} // namespace format
19861988
} // namespace clang

clang/lib/Format/FormatTokenLexer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#include "Encoding.h"
1919
#include "FormatToken.h"
20+
#include "clang/Support/Compiler.h"
2021
#include "llvm/ADT/MapVector.h"
2122
#include "llvm/ADT/SmallPtrSet.h"
2223
#include "llvm/ADT/StringSet.h"
@@ -32,7 +33,7 @@ enum LexerState {
3233
TOKEN_STASHED,
3334
};
3435

35-
class FormatTokenLexer {
36+
class CLANG_ABI FormatTokenLexer {
3637
public:
3738
FormatTokenLexer(const SourceManager &SourceMgr, FileID ID, unsigned Column,
3839
const FormatStyle &Style, encoding::Encoding Encoding,

clang/lib/Format/Macros.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include <list>
4242

4343
#include "FormatToken.h"
44+
#include "clang/Support/Compiler.h"
4445
#include "llvm/ADT/DenseMap.h"
4546

4647
namespace clang {
@@ -77,7 +78,7 @@ struct UnwrappedLineNode;
7778
/// Call : A(id)
7879
/// Expansion : id+x
7980
///
80-
class MacroExpander {
81+
class CLANG_ABI MacroExpander {
8182
public:
8283
using ArgsList = ArrayRef<SmallVector<FormatToken *, 8>>;
8384

@@ -170,7 +171,7 @@ class MacroExpander {
170171
/// -> public:
171172
/// -> void x();
172173
/// -> })
173-
class MacroCallReconstructor {
174+
class CLANG_ABI MacroCallReconstructor {
174175
public:
175176
/// Create an Reconstructor whose resulting \p UnwrappedLine will start at
176177
/// \p Level, using the map from name identifier token to the corresponding
@@ -327,7 +328,7 @@ class MacroCallReconstructor {
327328
// Stack of macro calls for which we're in the middle of an expansion.
328329
SmallVector<Expansion> ActiveExpansions;
329330

330-
struct MacroCallState {
331+
struct CLANG_ABI MacroCallState {
331332
MacroCallState(ReconstructedLine *Line, FormatToken *ParentLastToken,
332333
FormatToken *MacroCallLParen);
333334

clang/lib/Format/MatchFilePath.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
#ifndef LLVM_CLANG_LIB_FORMAT_MATCHFILEPATH_H
1010
#define LLVM_CLANG_LIB_FORMAT_MATCHFILEPATH_H
1111

12+
#include "clang/Support/Compiler.h"
1213
#include "llvm/ADT/StringRef.h"
1314

1415
namespace clang {
1516
namespace format {
1617

17-
bool matchFilePath(llvm::StringRef Pattern, llvm::StringRef FilePath);
18+
CLANG_ABI bool matchFilePath(llvm::StringRef Pattern, llvm::StringRef FilePath);
1819

1920
} // end namespace format
2021
} // end namespace clang

clang/lib/Format/QualifierAlignmentFixer.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define LLVM_CLANG_LIB_FORMAT_QUALIFIERALIGNMENTFIXER_H
1717

1818
#include "TokenAnalyzer.h"
19+
#include "clang/Support/Compiler.h"
1920

2021
namespace clang {
2122
namespace format {
@@ -24,24 +25,27 @@ typedef std::function<std::pair<tooling::Replacements, unsigned>(
2425
const Environment &)>
2526
AnalyzerPass;
2627

27-
void addQualifierAlignmentFixerPasses(const FormatStyle &Style,
28-
SmallVectorImpl<AnalyzerPass> &Passes);
28+
CLANG_ABI void
29+
addQualifierAlignmentFixerPasses(const FormatStyle &Style,
30+
SmallVectorImpl<AnalyzerPass> &Passes);
2931

30-
void prepareLeftRightOrderingForQualifierAlignmentFixer(
32+
CLANG_ABI void prepareLeftRightOrderingForQualifierAlignmentFixer(
3133
const std::vector<std::string> &Order, std::vector<std::string> &LeftOrder,
3234
std::vector<std::string> &RightOrder,
3335
std::vector<tok::TokenKind> &Qualifiers);
3436

3537
// Is the Token a simple or qualifier type
36-
bool isQualifierOrType(const FormatToken *Tok, const LangOptions &LangOpts);
37-
bool isConfiguredQualifierOrType(const FormatToken *Tok,
38-
const std::vector<tok::TokenKind> &Qualifiers,
38+
CLANG_ABI bool isQualifierOrType(const FormatToken *Tok,
3939
const LangOptions &LangOpts);
40+
CLANG_ABI bool
41+
isConfiguredQualifierOrType(const FormatToken *Tok,
42+
const std::vector<tok::TokenKind> &Qualifiers,
43+
const LangOptions &LangOpts);
4044

4145
// Is the Token likely a Macro
42-
bool isPossibleMacro(const FormatToken *Tok);
46+
CLANG_ABI bool isPossibleMacro(const FormatToken *Tok);
4347

44-
class LeftRightQualifierAlignmentFixer : public TokenAnalyzer {
48+
class CLANG_ABI LeftRightQualifierAlignmentFixer : public TokenAnalyzer {
4549
std::string Qualifier;
4650
bool RightAlign;
4751
SmallVector<tok::TokenKind, 8> QualifierTokens;

clang/lib/Format/TokenAnnotator.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define LLVM_CLANG_LIB_FORMAT_TOKENANNOTATOR_H
1717

1818
#include "UnwrappedLineParser.h"
19+
#include "clang/Support/Compiler.h"
1920

2021
namespace clang {
2122
namespace format {
@@ -210,7 +211,7 @@ class AnnotatedLine {
210211

211212
/// Determines extra information about the tokens comprising an
212213
/// \c UnwrappedLine.
213-
class TokenAnnotator {
214+
class CLANG_ABI TokenAnnotator {
214215
public:
215216
TokenAnnotator(const FormatStyle &Style, const AdditionalKeywords &Keywords)
216217
: Style(Style), IsCpp(Style.isCpp()),

0 commit comments

Comments
 (0)