Skip to content

Commit 2b31ba8

Browse files
committed
Auto generated visibility macros for clang public headers
1 parent be0b114 commit 2b31ba8

File tree

474 files changed

+2928
-2454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

474 files changed

+2928
-2454
lines changed

clang/include/clang/APINotes/APINotesManager.h

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

1212
#include "clang/Basic/SourceLocation.h"
13+
#include "clang/Support/Compiler.h"
1314
#include "llvm/ADT/ArrayRef.h"
1415
#include "llvm/ADT/DenseMap.h"
1516
#include "llvm/ADT/PointerUnion.h"
@@ -41,7 +42,7 @@ class APINotesReader;
4142
/// external API notes files that correspond to a given header. Its primary
4243
/// operation is \c findAPINotes(), which finds the API notes reader that
4344
/// provides information about the declarations at that location.
44-
class APINotesManager {
45+
class CLANG_ABI APINotesManager {
4546
using ReaderEntry = llvm::PointerUnion<DirectoryEntryRef, APINotesReader *>;
4647

4748
SourceManager &SM;

clang/include/clang/APINotes/APINotesReader.h

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

1818
#include "clang/APINotes/Types.h"
19+
#include "clang/Support/Compiler.h"
1920
#include "llvm/Support/MemoryBuffer.h"
2021
#include "llvm/Support/VersionTuple.h"
2122
#include <memory>
@@ -25,7 +26,7 @@ namespace api_notes {
2526

2627
/// A class that reads API notes data from a binary file that was written by
2728
/// the \c APINotesWriter.
28-
class APINotesReader {
29+
class CLANG_ABI APINotesReader {
2930
class Implementation;
3031
std::unique_ptr<Implementation> Implementation;
3132

clang/include/clang/APINotes/APINotesWriter.h

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

1818
#include "clang/APINotes/Types.h"
19+
#include "clang/Support/Compiler.h"
1920
#include "llvm/ADT/StringRef.h"
2021
#include "llvm/Support/VersionTuple.h"
2122
#include "llvm/Support/raw_ostream.h"
@@ -29,7 +30,7 @@ namespace api_notes {
2930

3031
/// A class that writes API notes data to a binary representation that can be
3132
/// read by the \c APINotesReader.
32-
class APINotesWriter {
33+
class CLANG_ABI APINotesWriter {
3334
class Implementation;
3435
std::unique_ptr<Implementation> Implementation;
3536

clang/include/clang/APINotes/APINotesYAMLCompiler.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef LLVM_CLANG_APINOTES_APINOTESYAMLCOMPILER_H
1010
#define LLVM_CLANG_APINOTES_APINOTESYAMLCOMPILER_H
1111

12+
#include "clang/Support/Compiler.h"
1213
#include "llvm/ADT/StringRef.h"
1314
#include "llvm/Support/SourceMgr.h"
1415
#include "llvm/Support/raw_ostream.h"
@@ -22,10 +23,10 @@ namespace api_notes {
2223
/// Parses the APINotes YAML content and writes the representation back to the
2324
/// specified stream. This provides a means of testing the YAML processing of
2425
/// the APINotes format.
25-
bool parseAndDumpAPINotes(llvm::StringRef YI, llvm::raw_ostream &OS);
26+
CLANG_ABI bool parseAndDumpAPINotes(llvm::StringRef YI, llvm::raw_ostream &OS);
2627

2728
/// Converts API notes from YAML format to binary format.
28-
bool compileAPINotes(llvm::StringRef YAMLInput, const FileEntry *SourceFile,
29+
CLANG_ABI bool compileAPINotes(llvm::StringRef YAMLInput, const FileEntry *SourceFile,
2930
llvm::raw_ostream &OS,
3031
llvm::SourceMgr::DiagHandlerTy DiagHandler = nullptr,
3132
void *DiagHandlerCtxt = nullptr);

clang/include/clang/APINotes/Types.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define LLVM_CLANG_APINOTES_TYPES_H
1111

1212
#include "clang/Basic/Specifiers.h"
13+
#include "clang/Support/Compiler.h"
1314
#include "llvm/ADT/ArrayRef.h"
1415
#include "llvm/ADT/StringRef.h"
1516
#include <climits>
@@ -49,7 +50,7 @@ enum class SwiftNewTypeKind {
4950
/// Describes API notes data for any entity.
5051
///
5152
/// This is used as the base of all API notes.
52-
class CommonEntityInfo {
53+
class CLANG_ABI CommonEntityInfo {
5354
public:
5455
/// Message to use when this entity is unavailable.
5556
std::string UnavailableMsg;
@@ -132,7 +133,7 @@ inline bool operator!=(const CommonEntityInfo &LHS,
132133
}
133134

134135
/// Describes API notes for types.
135-
class CommonTypeInfo : public CommonEntityInfo {
136+
class CLANG_ABI CommonTypeInfo : public CommonEntityInfo {
136137
/// The Swift type to which a given type is bridged.
137138
///
138139
/// Reflects the swift_bridge attribute.
@@ -194,7 +195,7 @@ inline bool operator!=(const CommonTypeInfo &LHS, const CommonTypeInfo &RHS) {
194195

195196
/// Describes API notes data for an Objective-C class or protocol or a C++
196197
/// namespace.
197-
class ContextInfo : public CommonTypeInfo {
198+
class CLANG_ABI ContextInfo : public CommonTypeInfo {
198199
/// Whether this class has a default nullability.
199200
LLVM_PREFERRED_TYPE(bool)
200201
unsigned HasDefaultNullability : 1;
@@ -301,7 +302,7 @@ inline bool operator!=(const ContextInfo &LHS, const ContextInfo &RHS) {
301302
}
302303

303304
/// API notes for a variable/property.
304-
class VariableInfo : public CommonEntityInfo {
305+
class CLANG_ABI VariableInfo : public CommonEntityInfo {
305306
/// Whether this property has been audited for nullability.
306307
LLVM_PREFERRED_TYPE(bool)
307308
unsigned NullabilityAudited : 1;
@@ -358,7 +359,7 @@ inline bool operator!=(const VariableInfo &LHS, const VariableInfo &RHS) {
358359
}
359360

360361
/// Describes API notes data for an Objective-C property.
361-
class ObjCPropertyInfo : public VariableInfo {
362+
class CLANG_ABI ObjCPropertyInfo : public VariableInfo {
362363
LLVM_PREFERRED_TYPE(bool)
363364
unsigned SwiftImportAsAccessorsSpecified : 1;
364365
LLVM_PREFERRED_TYPE(bool)
@@ -416,7 +417,7 @@ inline bool operator!=(const ObjCPropertyInfo &LHS,
416417
}
417418

418419
/// Describes a function or method parameter.
419-
class ParamInfo : public VariableInfo {
420+
class CLANG_ABI ParamInfo : public VariableInfo {
420421
/// Whether noescape was specified.
421422
LLVM_PREFERRED_TYPE(bool)
422423
unsigned NoEscapeSpecified : 1;
@@ -486,7 +487,7 @@ inline bool operator!=(const ParamInfo &LHS, const ParamInfo &RHS) {
486487
}
487488

488489
/// API notes for a function or method.
489-
class FunctionInfo : public CommonEntityInfo {
490+
class CLANG_ABI FunctionInfo : public CommonEntityInfo {
490491
private:
491492
static constexpr const uint64_t NullabilityKindMask = 0x3;
492493
static constexpr const unsigned NullabilityKindSize = 2;
@@ -606,7 +607,7 @@ inline bool operator!=(const FunctionInfo &LHS, const FunctionInfo &RHS) {
606607
}
607608

608609
/// Describes API notes data for an Objective-C method.
609-
class ObjCMethodInfo : public FunctionInfo {
610+
class CLANG_ABI ObjCMethodInfo : public FunctionInfo {
610611
public:
611612
/// Whether this is a designated initializer of its class.
612613
LLVM_PREFERRED_TYPE(bool)
@@ -675,7 +676,7 @@ class EnumConstantInfo : public CommonEntityInfo {
675676
};
676677

677678
/// Describes API notes data for a tag.
678-
class TagInfo : public CommonTypeInfo {
679+
class CLANG_ABI TagInfo : public CommonTypeInfo {
679680
LLVM_PREFERRED_TYPE(bool)
680681
unsigned HasFlagEnum : 1;
681682
LLVM_PREFERRED_TYPE(bool)
@@ -765,7 +766,7 @@ inline bool operator!=(const TagInfo &LHS, const TagInfo &RHS) {
765766
}
766767

767768
/// Describes API notes data for a typedef.
768-
class TypedefInfo : public CommonTypeInfo {
769+
class CLANG_ABI TypedefInfo : public CommonTypeInfo {
769770
public:
770771
std::optional<SwiftNewTypeKind> SwiftWrapper;
771772

clang/include/clang/ARCMigrate/ARCMT.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "clang/ARCMigrate/FileRemapper.h"
1313
#include "clang/Basic/SourceLocation.h"
1414
#include "clang/Frontend/CompilerInvocation.h"
15+
#include "clang/Support/Compiler.h"
1516

1617
namespace clang {
1718
class ASTContext;
@@ -37,7 +38,7 @@ namespace arcmt {
3738
/// the pre-migration ARC diagnostics.
3839
///
3940
/// \returns false if no error is produced, true otherwise.
40-
bool
41+
CLANG_ABI bool
4142
checkForManualIssues(CompilerInvocation &CI, const FrontendInputFile &Input,
4243
std::shared_ptr<PCHContainerOperations> PCHContainerOps,
4344
DiagnosticConsumer *DiagClient,
@@ -48,7 +49,7 @@ checkForManualIssues(CompilerInvocation &CI, const FrontendInputFile &Input,
4849
/// applies automatic modifications to source files to conform to ARC.
4950
///
5051
/// \returns false if no error is produced, true otherwise.
51-
bool
52+
CLANG_ABI bool
5253
applyTransformations(CompilerInvocation &origCI,
5354
const FrontendInputFile &Input,
5455
std::shared_ptr<PCHContainerOperations> PCHContainerOps,
@@ -65,7 +66,7 @@ applyTransformations(CompilerInvocation &origCI,
6566
/// the pre-migration ARC diagnostics.
6667
///
6768
/// \returns false if no error is produced, true otherwise.
68-
bool migrateWithTemporaryFiles(
69+
CLANG_ABI bool migrateWithTemporaryFiles(
6970
CompilerInvocation &origCI, const FrontendInputFile &Input,
7071
std::shared_ptr<PCHContainerOperations> PCHContainerOps,
7172
DiagnosticConsumer *DiagClient, StringRef outputDir,
@@ -75,25 +76,25 @@ bool migrateWithTemporaryFiles(
7576
/// migrateWithTemporaryFiles produced.
7677
///
7778
/// \returns false if no error is produced, true otherwise.
78-
bool getFileRemappings(std::vector<std::pair<std::string,std::string> > &remap,
79+
CLANG_ABI bool getFileRemappings(std::vector<std::pair<std::string,std::string> > &remap,
7980
StringRef outputDir,
8081
DiagnosticConsumer *DiagClient);
8182

8283
/// Get the set of file remappings from a list of files with remapping
8384
/// info.
8485
///
8586
/// \returns false if no error is produced, true otherwise.
86-
bool getFileRemappingsFromFileList(
87+
CLANG_ABI bool getFileRemappingsFromFileList(
8788
std::vector<std::pair<std::string,std::string> > &remap,
8889
ArrayRef<StringRef> remapFiles,
8990
DiagnosticConsumer *DiagClient);
9091

9192
typedef void (*TransformFn)(MigrationPass &pass);
9293

93-
std::vector<TransformFn> getAllTransformations(LangOptions::GCMode OrigGCMode,
94+
CLANG_ABI std::vector<TransformFn> getAllTransformations(LangOptions::GCMode OrigGCMode,
9495
bool NoFinalizeRemoval);
9596

96-
class MigrationProcess {
97+
class CLANG_ABI MigrationProcess {
9798
CompilerInvocation OrigCI;
9899
std::shared_ptr<PCHContainerOperations> PCHContainerOps;
99100
DiagnosticConsumer *DiagClient;
@@ -107,7 +108,7 @@ class MigrationProcess {
107108
DiagnosticConsumer *diagClient,
108109
StringRef outputDir = StringRef());
109110

110-
class RewriteListener {
111+
class CLANG_ABI RewriteListener {
111112
public:
112113
virtual ~RewriteListener();
113114

clang/include/clang/ARCMigrate/ARCMTActions.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,37 @@
1111

1212
#include "clang/ARCMigrate/FileRemapper.h"
1313
#include "clang/Frontend/FrontendAction.h"
14+
#include "clang/Support/Compiler.h"
1415
#include <memory>
1516

1617
namespace clang {
1718
namespace arcmt {
1819

19-
class CheckAction : public WrapperFrontendAction {
20+
class CLANG_ABI CheckAction : public WrapperFrontendAction {
2021
protected:
2122
bool BeginInvocation(CompilerInstance &CI) override;
2223

2324
public:
2425
CheckAction(std::unique_ptr<FrontendAction> WrappedAction);
2526
};
2627

27-
class ModifyAction : public WrapperFrontendAction {
28+
class CLANG_ABI ModifyAction : public WrapperFrontendAction {
2829
protected:
2930
bool BeginInvocation(CompilerInstance &CI) override;
3031

3132
public:
3233
ModifyAction(std::unique_ptr<FrontendAction> WrappedAction);
3334
};
3435

35-
class MigrateSourceAction : public ASTFrontendAction {
36+
class CLANG_ABI MigrateSourceAction : public ASTFrontendAction {
3637
FileRemapper Remapper;
3738
protected:
3839
bool BeginInvocation(CompilerInstance &CI) override;
3940
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
4041
StringRef InFile) override;
4142
};
4243

43-
class MigrateAction : public WrapperFrontendAction {
44+
class CLANG_ABI MigrateAction : public WrapperFrontendAction {
4445
std::string MigrateDir;
4546
std::string PlistOut;
4647
bool EmitPremigrationARCErrors;
@@ -55,7 +56,7 @@ class MigrateAction : public WrapperFrontendAction {
5556
};
5657

5758
/// Migrates to modern ObjC syntax.
58-
class ObjCMigrateAction : public WrapperFrontendAction {
59+
class CLANG_ABI ObjCMigrateAction : public WrapperFrontendAction {
5960
std::string MigrateDir;
6061
unsigned ObjCMigAction;
6162
FileRemapper Remapper;

clang/include/clang/ARCMigrate/FileRemapper.h

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

1212
#include "clang/Basic/FileEntry.h"
1313
#include "clang/Basic/LLVM.h"
14+
#include "clang/Support/Compiler.h"
1415
#include "llvm/ADT/DenseMap.h"
1516
#include "llvm/ADT/STLExtras.h"
1617
#include "llvm/ADT/StringRef.h"
@@ -29,7 +30,7 @@ namespace clang {
2930

3031
namespace arcmt {
3132

32-
class FileRemapper {
33+
class CLANG_ABI FileRemapper {
3334
// FIXME: Reuse the same FileManager for multiple ASTContexts.
3435
std::unique_ptr<FileManager> FileMgr;
3536

clang/include/clang/AST/APNumericStorage.h

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

12+
#include "clang/Support/Compiler.h"
1213
#include "llvm/ADT/APFloat.h"
1314
#include "llvm/ADT/APInt.h"
1415

@@ -23,7 +24,7 @@ class ASTContext;
2324
/// to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with
2425
/// the APFloat/APInt values will never get freed. APNumericStorage uses
2526
/// ASTContext's allocator for memory allocation.
26-
class APNumericStorage {
27+
class CLANG_ABI APNumericStorage {
2728
union {
2829
uint64_t VAL; ///< Used to store the <= 64 bits integer value.
2930
uint64_t *pVal; ///< Used to store the >64 bits integer value.

0 commit comments

Comments
 (0)