Skip to content

Commit 46924fe

Browse files
committed
[llvm] manual fixups to export annotations
1 parent 4a6fad9 commit 46924fe

Some content is hidden

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

53 files changed

+457
-431
lines changed

llvm/include/llvm/Support/AArch64AttributeParser.h

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

12+
#include "llvm/Support/Compiler.h"
1213
#include "llvm/Support/ELFAttrParserExtended.h"
1314
#include "llvm/Support/ELFAttributes.h"
1415

1516
namespace llvm {
1617

1718
class AArch64AttributeParser : public ELFExtendedAttrParser {
18-
static std::vector<SubsectionAndTagToTagName> &returnTagsNamesMap();
19+
LLVM_ABI static std::vector<SubsectionAndTagToTagName> &returnTagsNamesMap();
1920

2021
public:
2122
AArch64AttributeParser(ScopedPrinter *Sw)

llvm/include/llvm/Support/ARMAttributeParser.h

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

1212
#include "ARMBuildAttributes.h"
1313
#include "llvm/ADT/StringRef.h"
14+
#include "llvm/Support/Compiler.h"
1415
#include "llvm/Support/ELFAttrParserCompact.h"
1516
#include "llvm/Support/Error.h"
1617

1718
namespace llvm {
1819

1920
class ScopedPrinter;
2021

21-
class ARMAttributeParser : public ELFCompactAttrParser {
22+
class LLVM_ABI ARMAttributeParser : public ELFCompactAttrParser {
2223
struct DisplayHandler {
2324
ARMBuildAttrs::AttrType attribute;
2425
Error (ARMAttributeParser::*routine)(ARMBuildAttrs::AttrType);

llvm/include/llvm/Support/BinaryStreamError.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ enum class stream_error_code {
2525
};
2626

2727
/// Base class for errors originating when parsing raw PDB files
28-
class BinaryStreamError : public ErrorInfo<BinaryStreamError> {
28+
class LLVM_ABI BinaryStreamError : public ErrorInfo<BinaryStreamError> {
2929
public:
30-
LLVM_ABI static char ID;
31-
LLVM_ABI explicit BinaryStreamError(stream_error_code C);
32-
LLVM_ABI explicit BinaryStreamError(StringRef Context);
33-
LLVM_ABI BinaryStreamError(stream_error_code C, StringRef Context);
30+
static char ID;
31+
explicit BinaryStreamError(stream_error_code C);
32+
explicit BinaryStreamError(StringRef Context);
33+
BinaryStreamError(stream_error_code C, StringRef Context);
3434

35-
LLVM_ABI void log(raw_ostream &OS) const override;
36-
LLVM_ABI std::error_code convertToErrorCode() const override;
35+
void log(raw_ostream &OS) const override;
36+
std::error_code convertToErrorCode() const override;
3737

38-
LLVM_ABI StringRef getErrorMessage() const;
38+
StringRef getErrorMessage() const;
3939

4040
stream_error_code getErrorCode() const { return Code; }
4141

llvm/include/llvm/Support/BinaryStreamReader.h

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@ namespace llvm {
2727
/// null-terminated strings, integers in various flavors of endianness, etc.
2828
/// Can be subclassed to provide reading of custom datatypes, although no
2929
/// are overridable.
30-
class BinaryStreamReader {
30+
class LLVM_ABI BinaryStreamReader {
3131
public:
3232
BinaryStreamReader() = default;
33-
LLVM_ABI explicit BinaryStreamReader(BinaryStreamRef Ref);
34-
LLVM_ABI explicit BinaryStreamReader(BinaryStream &Stream);
35-
LLVM_ABI explicit BinaryStreamReader(ArrayRef<uint8_t> Data,
36-
llvm::endianness Endian);
37-
LLVM_ABI explicit BinaryStreamReader(StringRef Data, llvm::endianness Endian);
33+
explicit BinaryStreamReader(BinaryStreamRef Ref);
34+
explicit BinaryStreamReader(BinaryStream &Stream);
35+
explicit BinaryStreamReader(ArrayRef<uint8_t> Data, llvm::endianness Endian);
36+
explicit BinaryStreamReader(StringRef Data, llvm::endianness Endian);
3837

3938
BinaryStreamReader(const BinaryStreamReader &Other) = default;
4039

@@ -48,7 +47,7 @@ class BinaryStreamReader {
4847
///
4948
/// \returns a success error code if the data was successfully read, otherwise
5049
/// returns an appropriate error code.
51-
LLVM_ABI Error readLongestContiguousChunk(ArrayRef<uint8_t> &Buffer);
50+
Error readLongestContiguousChunk(ArrayRef<uint8_t> &Buffer);
5251

5352
/// Read \p Size bytes from the underlying stream at the current offset and
5453
/// and set \p Buffer to the resulting data slice. Whether a copy occurs
@@ -57,7 +56,7 @@ class BinaryStreamReader {
5756
///
5857
/// \returns a success error code if the data was successfully read, otherwise
5958
/// returns an appropriate error code.
60-
LLVM_ABI Error readBytes(ArrayRef<uint8_t> &Buffer, uint32_t Size);
59+
Error readBytes(ArrayRef<uint8_t> &Buffer, uint32_t Size);
6160

6261
/// Read an integer of the specified endianness into \p Dest and update the
6362
/// stream's offset. The data is always copied from the stream's underlying
@@ -93,44 +92,44 @@ class BinaryStreamReader {
9392
///
9493
/// \returns a success error code if the data was successfully read, otherwise
9594
/// returns an appropriate error code.
96-
LLVM_ABI Error readULEB128(uint64_t &Dest);
95+
Error readULEB128(uint64_t &Dest);
9796

9897
/// Read a signed LEB128 encoded value.
9998
///
10099
/// \returns a success error code if the data was successfully read, otherwise
101100
/// returns an appropriate error code.
102-
LLVM_ABI Error readSLEB128(int64_t &Dest);
101+
Error readSLEB128(int64_t &Dest);
103102

104103
/// Read a null terminated string from \p Dest. Whether a copy occurs depends
105104
/// on the implementation of the underlying stream. Updates the stream's
106105
/// offset to point after the newly read data.
107106
///
108107
/// \returns a success error code if the data was successfully read, otherwise
109108
/// returns an appropriate error code.
110-
LLVM_ABI Error readCString(StringRef &Dest);
109+
Error readCString(StringRef &Dest);
111110

112111
/// Similar to readCString, however read a null-terminated UTF16 string
113112
/// instead.
114113
///
115114
/// \returns a success error code if the data was successfully read, otherwise
116115
/// returns an appropriate error code.
117-
LLVM_ABI Error readWideString(ArrayRef<UTF16> &Dest);
116+
Error readWideString(ArrayRef<UTF16> &Dest);
118117

119118
/// Read a \p Length byte string into \p Dest. Whether a copy occurs depends
120119
/// on the implementation of the underlying stream. Updates the stream's
121120
/// offset to point after the newly read data.
122121
///
123122
/// \returns a success error code if the data was successfully read, otherwise
124123
/// returns an appropriate error code.
125-
LLVM_ABI Error readFixedString(StringRef &Dest, uint32_t Length);
124+
Error readFixedString(StringRef &Dest, uint32_t Length);
126125

127126
/// Read the entire remainder of the underlying stream into \p Ref. This is
128127
/// equivalent to calling getUnderlyingStream().slice(Offset). Updates the
129128
/// stream's offset to point to the end of the stream. Never causes a copy.
130129
///
131130
/// \returns a success error code if the data was successfully read, otherwise
132131
/// returns an appropriate error code.
133-
LLVM_ABI Error readStreamRef(BinaryStreamRef &Ref);
132+
Error readStreamRef(BinaryStreamRef &Ref);
134133

135134
/// Read \p Length bytes from the underlying stream into \p Ref. This is
136135
/// equivalent to calling getUnderlyingStream().slice(Offset, Length).
@@ -139,7 +138,7 @@ class BinaryStreamReader {
139138
///
140139
/// \returns a success error code if the data was successfully read, otherwise
141140
/// returns an appropriate error code.
142-
LLVM_ABI Error readStreamRef(BinaryStreamRef &Ref, uint32_t Length);
141+
Error readStreamRef(BinaryStreamRef &Ref, uint32_t Length);
143142

144143
/// Read \p Length bytes from the underlying stream into \p Ref. This is
145144
/// equivalent to calling getUnderlyingStream().slice(Offset, Length).
@@ -148,7 +147,7 @@ class BinaryStreamReader {
148147
///
149148
/// \returns a success error code if the data was successfully read, otherwise
150149
/// returns an appropriate error code.
151-
LLVM_ABI Error readSubstream(BinarySubstreamRef &Ref, uint32_t Length);
150+
Error readSubstream(BinarySubstreamRef &Ref, uint32_t Length);
152151

153152
/// Get a pointer to an object of type T from the underlying stream, as if by
154153
/// memcpy, and store the result into \p Dest. It is up to the caller to
@@ -253,17 +252,17 @@ class BinaryStreamReader {
253252
///
254253
/// \returns a success error code if at least \p Amount bytes remain in the
255254
/// stream, otherwise returns an appropriate error code.
256-
LLVM_ABI Error skip(uint64_t Amount);
255+
Error skip(uint64_t Amount);
257256

258257
/// Examine the next byte of the underlying stream without advancing the
259258
/// stream's offset. If the stream is empty the behavior is undefined.
260259
///
261260
/// \returns the next byte in the stream.
262-
LLVM_ABI uint8_t peek() const;
261+
uint8_t peek() const;
263262

264-
LLVM_ABI Error padToAlignment(uint32_t Align);
263+
Error padToAlignment(uint32_t Align);
265264

266-
LLVM_ABI std::pair<BinaryStreamReader, BinaryStreamReader>
265+
std::pair<BinaryStreamReader, BinaryStreamReader>
267266
split(uint64_t Offset) const;
268267

269268
private:

llvm/include/llvm/Support/COM.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@
1414
#ifndef LLVM_SUPPORT_COM_H
1515
#define LLVM_SUPPORT_COM_H
1616

17+
#include "llvm/Support/Compiler.h"
18+
1719
namespace llvm {
1820
namespace sys {
1921

2022
enum class COMThreadingMode { SingleThreaded, MultiThreaded };
2123

22-
class InitializeCOMRAII {
24+
class LLVM_ABI InitializeCOMRAII {
2325
public:
24-
LLVM_ABI explicit InitializeCOMRAII(COMThreadingMode Threading,
25-
bool SpeedOverMemory = false);
26-
LLVM_ABI ~InitializeCOMRAII();
26+
explicit InitializeCOMRAII(COMThreadingMode Threading,
27+
bool SpeedOverMemory = false);
28+
~InitializeCOMRAII();
2729

2830
private:
2931
InitializeCOMRAII(const InitializeCOMRAII &) = delete;

llvm/include/llvm/Support/CSKYAttributeParser.h

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

1212
#include "llvm/Support/CSKYAttributes.h"
13+
#include "llvm/Support/Compiler.h"
1314
#include "llvm/Support/ELFAttrParserCompact.h"
1415

1516
namespace llvm {
16-
class CSKYAttributeParser : public ELFCompactAttrParser {
17+
class LLVM_ABI CSKYAttributeParser : public ELFCompactAttrParser {
1718
struct DisplayHandler {
1819
CSKYAttrs::AttrType attribute;
1920
Error (CSKYAttributeParser::*routine)(unsigned);

0 commit comments

Comments
 (0)