Skip to content

Commit d6924b9

Browse files
committed
Auto generated visibility macros for clang source files
1 parent 015c261 commit d6924b9

File tree

13 files changed

+260
-247
lines changed

13 files changed

+260
-247
lines changed

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "PrimType.h"
1717
#include "Program.h"
1818
#include "clang/AST/Attr.h"
19+
#include "clang/Support/Compiler.h"
1920

2021
using namespace clang;
2122
using namespace clang::interp;
@@ -6406,8 +6407,8 @@ bool Compiler<Emitter>::emitDestruction(const Descriptor *Desc,
64066407
namespace clang {
64076408
namespace interp {
64086409

6409-
template class Compiler<ByteCodeEmitter>;
6410-
template class Compiler<EvalEmitter>;
6410+
template class CLANG_EXPORT_TEMPLATE Compiler<ByteCodeEmitter>;
6411+
template class CLANG_EXPORT_TEMPLATE Compiler<EvalEmitter>;
64116412

64126413
} // namespace interp
64136414
} // namespace clang

clang/lib/ASTMatchers/ASTMatchersInternal.cpp

Lines changed: 231 additions & 230 deletions
Large diffs are not rendered by default.

clang/lib/CodeGen/CGExprAgg.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "clang/AST/DeclCXX.h"
2323
#include "clang/AST/DeclTemplate.h"
2424
#include "clang/AST/StmtVisitor.h"
25+
#include "clang/Support/Compiler.h"
2526
#include "llvm/IR/Constants.h"
2627
#include "llvm/IR/Function.h"
2728
#include "llvm/IR/GlobalVariable.h"
@@ -36,7 +37,7 @@ using namespace CodeGen;
3637
//===----------------------------------------------------------------------===//
3738

3839
namespace llvm {
39-
extern cl::opt<bool> EnableSingleByteCoverage;
40+
CLANG_ABI extern cl::opt<bool> EnableSingleByteCoverage;
4041
} // namespace llvm
4142

4243
namespace {

clang/lib/CodeGen/CGExprComplex.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "CodeGenModule.h"
1616
#include "ConstantEmitter.h"
1717
#include "clang/AST/StmtVisitor.h"
18+
#include "clang/Support/Compiler.h"
1819
#include "llvm/ADT/STLExtras.h"
1920
#include "llvm/IR/Constants.h"
2021
#include "llvm/IR/Instructions.h"
@@ -29,7 +30,7 @@ using namespace CodeGen;
2930
//===----------------------------------------------------------------------===//
3031

3132
namespace llvm {
32-
extern cl::opt<bool> EnableSingleByteCoverage;
33+
CLANG_ABI extern cl::opt<bool> EnableSingleByteCoverage;
3334
} // namespace llvm
3435

3536
typedef CodeGenFunction::ComplexPairTy ComplexPairTy;

clang/lib/CodeGen/CGExprScalar.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "clang/AST/StmtVisitor.h"
3030
#include "clang/Basic/CodeGenOptions.h"
3131
#include "clang/Basic/TargetInfo.h"
32+
#include "clang/Support/Compiler.h"
3233
#include "llvm/ADT/APFixedPoint.h"
3334
#include "llvm/IR/CFG.h"
3435
#include "llvm/IR/Constants.h"
@@ -56,7 +57,7 @@ using llvm::Value;
5657
//===----------------------------------------------------------------------===//
5758

5859
namespace llvm {
59-
extern cl::opt<bool> EnableSingleByteCoverage;
60+
CLANG_ABI extern cl::opt<bool> EnableSingleByteCoverage;
6061
} // namespace llvm
6162

6263
namespace {

clang/lib/CodeGen/CGStmt.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "clang/Basic/PrettyStackTrace.h"
2525
#include "clang/Basic/SourceManager.h"
2626
#include "clang/Basic/TargetInfo.h"
27+
#include "clang/Support/Compiler.h"
2728
#include "llvm/ADT/ArrayRef.h"
2829
#include "llvm/ADT/DenseMap.h"
2930
#include "llvm/ADT/SmallSet.h"
@@ -44,7 +45,7 @@ using namespace CodeGen;
4445
//===----------------------------------------------------------------------===//
4546

4647
namespace llvm {
47-
extern cl::opt<bool> EnableSingleByteCoverage;
48+
CLANG_ABI extern cl::opt<bool> EnableSingleByteCoverage;
4849
} // namespace llvm
4950

5051
void CodeGenFunction::EmitStopPoint(const Stmt *S) {

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "clang/Basic/TargetInfo.h"
3636
#include "clang/CodeGen/CGFunctionInfo.h"
3737
#include "clang/Frontend/FrontendDiagnostic.h"
38+
#include "clang/Support/Compiler.h"
3839
#include "llvm/ADT/ArrayRef.h"
3940
#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"
4041
#include "llvm/IR/DataLayout.h"
@@ -54,7 +55,7 @@ using namespace clang;
5455
using namespace CodeGen;
5556

5657
namespace llvm {
57-
extern cl::opt<bool> EnableSingleByteCoverage;
58+
CLANG_ABI extern cl::opt<bool> EnableSingleByteCoverage;
5859
} // namespace llvm
5960

6061
/// shouldEmitLifetimeMarkers - Decide whether we need emit the life-time

clang/lib/CodeGen/CodeGenPGO.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "CoverageMappingGen.h"
1616
#include "clang/AST/RecursiveASTVisitor.h"
1717
#include "clang/AST/StmtVisitor.h"
18+
#include "clang/Support/Compiler.h"
1819
#include "llvm/IR/Intrinsics.h"
1920
#include "llvm/IR/MDBuilder.h"
2021
#include "llvm/Support/CommandLine.h"
@@ -24,7 +25,7 @@
2425
#include <optional>
2526

2627
namespace llvm {
27-
extern cl::opt<bool> EnableSingleByteCoverage;
28+
CLANG_ABI extern cl::opt<bool> EnableSingleByteCoverage;
2829
} // namespace llvm
2930

3031
static llvm::cl::opt<bool>

clang/lib/CodeGen/CoverageMappingGen.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "clang/Basic/FileManager.h"
1818
#include "clang/Frontend/FrontendDiagnostic.h"
1919
#include "clang/Lex/Lexer.h"
20+
#include "clang/Support/Compiler.h"
2021
#include "llvm/ADT/DenseSet.h"
2122
#include "llvm/ADT/SmallSet.h"
2223
#include "llvm/ADT/StringExtras.h"
@@ -33,7 +34,7 @@
3334
#define COVMAP_V3
3435

3536
namespace llvm {
36-
cl::opt<bool>
37+
CLANG_ABI cl::opt<bool>
3738
EnableSingleByteCoverage("enable-single-byte-coverage",
3839
llvm::cl::ZeroOrMore,
3940
llvm::cl::desc("Enable single byte coverage"),
@@ -47,7 +48,7 @@ static llvm::cl::opt<bool> EmptyLineCommentCoverage(
4748
llvm::cl::init(true), llvm::cl::Hidden);
4849

4950
namespace llvm::coverage {
50-
cl::opt<bool> SystemHeadersCoverage(
51+
CLANG_ABI cl::opt<bool> SystemHeadersCoverage(
5152
"system-headers-coverage",
5253
cl::desc("Enable collecting coverage from system headers"), cl::init(false),
5354
cl::Hidden);

clang/lib/Format/Format.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "SortJavaScriptImports.h"
2222
#include "UnwrappedLineFormatter.h"
2323
#include "UsingDeclarationsSorter.h"
24+
#include "clang/Support/Compiler.h"
2425
#include "clang/Tooling/Inclusions/HeaderIncludes.h"
2526
#include "llvm/ADT/Sequence.h"
2627

@@ -3919,7 +3920,7 @@ LangOptions getFormattingLangOpts(const FormatStyle &Style) {
39193920
return LangOpts;
39203921
}
39213922

3922-
const char *StyleOptionHelpDescription =
3923+
CLANG_ABI const char *StyleOptionHelpDescription =
39233924
"Set coding style. <string> can be:\n"
39243925
"1. A preset: LLVM, GNU, Google, Chromium, Microsoft,\n"
39253926
" Mozilla, WebKit.\n"
@@ -3992,9 +3993,9 @@ FormatStyle::LanguageKind guessLanguage(StringRef FileName, StringRef Code) {
39923993
}
39933994

39943995
// Update StyleOptionHelpDescription above when changing this.
3995-
const char *DefaultFormatStyle = "file";
3996+
CLANG_ABI const char *DefaultFormatStyle = "file";
39963997

3997-
const char *DefaultFallbackStyle = "LLVM";
3998+
CLANG_ABI const char *DefaultFallbackStyle = "LLVM";
39983999

39994000
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
40004001
loadAndParseConfigFile(StringRef ConfigFile, llvm::vfs::FileSystem *FS,

clang/lib/Tooling/AllTUsExecution.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "clang/Tooling/AllTUsExecution.h"
10+
#include "clang/Support/Compiler.h"
1011
#include "clang/Tooling/ToolExecutorPluginRegistry.h"
1112
#include "llvm/Support/Regex.h"
1213
#include "llvm/Support/ThreadPool.h"
@@ -55,7 +56,7 @@ class ThreadSafeToolResults : public ToolResults {
5556

5657
} // namespace
5758

58-
llvm::cl::opt<std::string>
59+
CLANG_ABI llvm::cl::opt<std::string>
5960
Filter("filter",
6061
llvm::cl::desc("Only process files that match this filter. "
6162
"This flag only applies to all-TUs."),
@@ -148,7 +149,7 @@ llvm::Error AllTUsToolExecutor::execute(
148149
return llvm::Error::success();
149150
}
150151

151-
llvm::cl::opt<unsigned> ExecutorConcurrency(
152+
CLANG_ABI llvm::cl::opt<unsigned> ExecutorConcurrency(
152153
"execute-concurrency",
153154
llvm::cl::desc("The number of threads used to process all files in "
154155
"parallel. Set to 0 for hardware concurrency. "

clang/lib/Tooling/Execution.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "clang/Tooling/Execution.h"
10+
#include "clang/Support/Compiler.h"
1011
#include "clang/Tooling/ToolExecutorPluginRegistry.h"
1112
#include "clang/Tooling/Tooling.h"
1213

@@ -15,7 +16,7 @@ LLVM_INSTANTIATE_REGISTRY(clang::tooling::ToolExecutorPluginRegistry)
1516
namespace clang {
1617
namespace tooling {
1718

18-
llvm::cl::opt<std::string>
19+
CLANG_ABI llvm::cl::opt<std::string>
1920
ExecutorName("executor", llvm::cl::desc("The name of the executor to use."),
2021
llvm::cl::init("standalone"));
2122

clang/lib/Tooling/Transformer/RewriteRule.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "clang/ASTMatchers/ASTMatchFinder.h"
1313
#include "clang/ASTMatchers/ASTMatchers.h"
1414
#include "clang/Basic/SourceLocation.h"
15+
#include "clang/Support/Compiler.h"
1516
#include "clang/Tooling/Transformer/SourceCode.h"
1617
#include "llvm/ADT/StringRef.h"
1718
#include "llvm/Support/Errc.h"
@@ -29,7 +30,7 @@ using ast_matchers::internal::DynTypedMatcher;
2930

3031
using MatchResult = MatchFinder::MatchResult;
3132

32-
const char transformer::RootID[] = "___root___";
33+
CLANG_ABI const char transformer::RootID[] = "___root___";
3334

3435
static Expected<SmallVector<transformer::Edit, 1>>
3536
translateEdits(const MatchResult &Result, ArrayRef<ASTEdit> ASTEdits) {

0 commit comments

Comments
 (0)