Skip to content

Commit 015c261

Browse files
committed
Auto generated visibility macros for clang internal headers
1 parent 7f18296 commit 015c261

File tree

11 files changed

+36
-25
lines changed

11 files changed

+36
-25
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: 6 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 {
@@ -220,7 +221,7 @@ enum TokenType : uint8_t {
220221
};
221222

222223
/// Determines the name of a token type.
223-
const char *getTokenTypeName(TokenType Type);
224+
CLANG_ABI const char *getTokenTypeName(TokenType Type);
224225

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

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

934-
class TokenRole {
935+
class CLANG_ABI TokenRole {
935936
public:
936937
TokenRole(const FormatStyle &Style) : Style(Style) {}
937938
virtual ~TokenRole();
@@ -969,7 +970,7 @@ class TokenRole {
969970
const FormatStyle &Style;
970971
};
971972

972-
class CommaSeparatedList : public TokenRole {
973+
class CLANG_ABI CommaSeparatedList : public TokenRole {
973974
public:
974975
CommaSeparatedList(const FormatStyle &Style)
975976
: TokenRole(Style), HasNestedBracedList(false) {}
@@ -1981,7 +1982,7 @@ inline bool continuesLineComment(const FormatToken &FormatTok,
19811982
}
19821983

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

19861987
} // namespace format
19871988
} // 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: 7 additions & 6 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,24 @@ typedef std::function<std::pair<tooling::Replacements, unsigned>(
2425
const Environment &)>
2526
AnalyzerPass;
2627

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

30-
void prepareLeftRightOrderingForQualifierAlignmentFixer(
31+
CLANG_ABI void prepareLeftRightOrderingForQualifierAlignmentFixer(
3132
const std::vector<std::string> &Order, std::vector<std::string> &LeftOrder,
3233
std::vector<std::string> &RightOrder,
3334
std::vector<tok::TokenKind> &Qualifiers);
3435

3536
// Is the Token a simple or qualifier type
36-
bool isQualifierOrType(const FormatToken *Tok, const LangOptions &LangOpts);
37-
bool isConfiguredQualifierOrType(const FormatToken *Tok,
37+
CLANG_ABI bool isQualifierOrType(const FormatToken *Tok, const LangOptions &LangOpts);
38+
CLANG_ABI bool isConfiguredQualifierOrType(const FormatToken *Tok,
3839
const std::vector<tok::TokenKind> &Qualifiers,
3940
const LangOptions &LangOpts);
4041

4142
// Is the Token likely a Macro
42-
bool isPossibleMacro(const FormatToken *Tok);
43+
CLANG_ABI bool isPossibleMacro(const FormatToken *Tok);
4344

44-
class LeftRightQualifierAlignmentFixer : public TokenAnalyzer {
45+
class CLANG_ABI LeftRightQualifierAlignmentFixer : public TokenAnalyzer {
4546
std::string Qualifier;
4647
bool RightAlign;
4748
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)