Skip to content

Commit 3053625

Browse files
committed
🍒 Add missing LLVM_ABI annotations (llvm#165908)
Bug: swiftlang/swift#85241
1 parent e01cc9a commit 3053625

File tree

8 files changed

+18
-17
lines changed

8 files changed

+18
-17
lines changed

llvm/include/llvm/Support/SourceMgr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,18 @@ class SourceMgr {
103103

104104
public:
105105
/// Create new source manager without support for include files.
106-
SourceMgr();
106+
LLVM_ABI SourceMgr();
107107
/// Create new source manager with the capability of finding include files
108108
/// via the provided file system.
109109
explicit SourceMgr(IntrusiveRefCntPtr<vfs::FileSystem> FS);
110110
SourceMgr(const SourceMgr &) = delete;
111111
SourceMgr &operator=(const SourceMgr &) = delete;
112112
SourceMgr(SourceMgr &&);
113113
SourceMgr &operator=(SourceMgr &&);
114-
~SourceMgr();
114+
LLVM_ABI ~SourceMgr();
115115

116116
IntrusiveRefCntPtr<vfs::FileSystem> getVirtualFileSystem() const;
117-
void setVirtualFileSystem(IntrusiveRefCntPtr<vfs::FileSystem> FS);
117+
LLVM_ABI void setVirtualFileSystem(IntrusiveRefCntPtr<vfs::FileSystem> FS);
118118

119119
/// Return the include directories of this source manager.
120120
ArrayRef<std::string> getIncludeDirs() const { return IncludeDirectories; }

llvm/include/llvm/Support/VirtualFileSystem.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,8 +1166,9 @@ class LLVM_ABI RedirectingFileSystem
11661166
/// Collect all pairs of <virtual path, real path> entries from the
11671167
/// \p VFS. This is used by the module dependency collector to forward
11681168
/// the entries into the reproducer output VFS YAML file.
1169-
void collectVFSEntries(RedirectingFileSystem &VFS,
1170-
SmallVectorImpl<YAMLVFSEntry> &CollectedEntries);
1169+
LLVM_ABI void
1170+
collectVFSEntries(RedirectingFileSystem &VFS,
1171+
SmallVectorImpl<YAMLVFSEntry> &CollectedEntries);
11711172

11721173
class YAMLVFSWriter {
11731174
std::vector<YAMLVFSEntry> Mappings;

llvm/include/llvm/Support/VirtualOutputBackend.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace vfs {
2222
/// If virtual functions are added here, also add them to \a
2323
/// ProxyOutputBackend.
2424
class OutputBackend : public RefCountedBase<OutputBackend> {
25-
virtual void anchor();
25+
LLVM_ABI virtual void anchor();
2626

2727
public:
2828
/// Get a backend that points to the same destination as this one but that
@@ -37,7 +37,7 @@ class OutputBackend : public RefCountedBase<OutputBackend> {
3737
/// have been customized).
3838
///
3939
/// Thread-safe.
40-
Expected<OutputFile>
40+
LLVM_ABI Expected<OutputFile>
4141
createFile(const Twine &Path,
4242
std::optional<OutputConfig> Config = std::nullopt);
4343

llvm/include/llvm/Support/VirtualOutputBackends.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ class ProxyOutputBackend : public OutputBackend {
6464

6565
/// An output backend that creates files on disk, wrapping APIs in sys::fs.
6666
class OnDiskOutputBackend : public OutputBackend {
67-
void anchor() override;
67+
LLVM_ABI void anchor() override;
6868

6969
protected:
7070
IntrusiveRefCntPtr<OutputBackend> cloneImpl() const override {
7171
return clone();
7272
}
7373

74-
Expected<std::unique_ptr<OutputFileImpl>>
74+
LLVM_ABI Expected<std::unique_ptr<OutputFileImpl>>
7575
createFileImpl(StringRef Path, std::optional<OutputConfig> Config) override;
7676

7777
public:

llvm/include/llvm/Support/VirtualOutputError.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class OutputError : public ErrorInfo<OutputError, ECError> {
4242
}
4343

4444
// Used by ErrorInfo::classID.
45-
static char ID;
45+
LLVM_ABI static char ID;
4646

4747
OutputError(const Twine &OutputPath, std::error_code EC)
4848
: ErrorInfo<OutputError, ECError>(EC), OutputPath(OutputPath.str()) {
@@ -104,7 +104,7 @@ class TempFileOutputError : public ErrorInfo<TempFileOutputError, OutputError> {
104104
}
105105

106106
// Used by ErrorInfo::classID.
107-
static char ID;
107+
LLVM_ABI static char ID;
108108

109109
TempFileOutputError(const Twine &TempPath, const Twine &OutputPath,
110110
std::error_code EC)

llvm/include/llvm/Support/VirtualOutputFile.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ class OutputFile {
7474
///
7575
/// If there's an open proxy from \a createProxy(), calls \a discard() to
7676
/// clean up temporaries followed by \a report_fatal_error().
77-
Error keep();
77+
LLVM_ABI Error keep();
7878

7979
/// Discard an output, cleaning up any temporary state. Errors if clean-up
8080
/// fails.
8181
///
8282
/// If it has already been closed, calls \a report_fatal_error().
83-
Error discard();
83+
LLVM_ABI Error discard();
8484

8585
/// Discard the output when destroying it if it's still open, sending the
8686
/// result to \a Handler.
@@ -92,7 +92,7 @@ class OutputFile {
9292
/// producer. Errors if there's already a proxy. The proxy must be deleted
9393
/// before calling \a keep(). The proxy will crash if it's written to after
9494
/// calling \a discard().
95-
Expected<std::unique_ptr<raw_pwrite_stream>> createProxy();
95+
LLVM_ABI Expected<std::unique_ptr<raw_pwrite_stream>> createProxy();
9696

9797
bool hasOpenProxy() const { return OpenProxy; }
9898

@@ -126,7 +126,7 @@ class OutputFile {
126126
private:
127127
/// Destroy \a Impl. Reports fatal error if the file is open and there's no
128128
/// handler from \a discardOnDestroy().
129-
void destroy();
129+
LLVM_ABI void destroy();
130130
OutputFile &moveFrom(OutputFile &O) {
131131
Path = std::move(O.Path);
132132
Impl = std::move(O.Impl);

llvm/include/llvm/Transforms/IPO/InferFunctionAttrs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Module;
2323
/// A pass which infers function attributes from the names and signatures of
2424
/// function declarations in a module.
2525
struct InferFunctionAttrsPass : PassInfoMixin<InferFunctionAttrsPass> {
26-
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
26+
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
2727
};
2828

2929
}

llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Module;
3030
/// appends globals to llvm.compiler.used.
3131
class SanitizerCoveragePass : public PassInfoMixin<SanitizerCoveragePass> {
3232
public:
33-
explicit SanitizerCoveragePass(
33+
LLVM_ABI explicit SanitizerCoveragePass(
3434
SanitizerCoverageOptions Options = SanitizerCoverageOptions(),
3535
const std::vector<std::string> &AllowlistFiles =
3636
std::vector<std::string>(),

0 commit comments

Comments
 (0)