Skip to content

Commit e81fb74

Browse files
committed
[llvm] annotate remaining Support library interfaces for DLL export
1 parent bb8c42e commit e81fb74

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

llvm/include/llvm/Support/ConvertUTF.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,9 @@ LLVM_ABI bool convertUTF32ToUTF8String(ArrayRef<UTF32> Src, std::string &Out);
346346
LLVM_ABI bool convertUTF8ToUTF16String(StringRef SrcUTF8,
347347
SmallVectorImpl<UTF16> &DstUTF16);
348348

349-
bool IsSingleCodeUnitUTF8Codepoint(unsigned);
350-
bool IsSingleCodeUnitUTF16Codepoint(unsigned);
351-
bool IsSingleCodeUnitUTF32Codepoint(unsigned);
349+
LLVM_ABI bool IsSingleCodeUnitUTF8Codepoint(unsigned);
350+
LLVM_ABI bool IsSingleCodeUnitUTF16Codepoint(unsigned);
351+
LLVM_ABI bool IsSingleCodeUnitUTF32Codepoint(unsigned);
352352

353353
#if defined(_WIN32)
354354
namespace sys {

llvm/include/llvm/Support/KnownFPClass.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef LLVM_SUPPORT_KNOWNFPCLASS_H
1515
#define LLVM_SUPPORT_KNOWNFPCLASS_H
1616

17+
#include "llvm/Support/Compiler.h"
1718
#include "llvm/ADT/FloatingPointMode.h"
1819
#include <optional>
1920

@@ -78,13 +79,13 @@ struct KnownFPClass {
7879
/// Return true if it's know this can never be interpreted as a zero. This
7980
/// extends isKnownNeverZero to cover the case where the assumed
8081
/// floating-point mode for the function interprets denormals as zero.
81-
bool isKnownNeverLogicalZero(DenormalMode Mode) const;
82+
LLVM_ABI bool isKnownNeverLogicalZero(DenormalMode Mode) const;
8283

8384
/// Return true if it's know this can never be interpreted as a negative zero.
84-
bool isKnownNeverLogicalNegZero(DenormalMode Mode) const;
85+
LLVM_ABI bool isKnownNeverLogicalNegZero(DenormalMode Mode) const;
8586

8687
/// Return true if it's know this can never be interpreted as a positive zero.
87-
bool isKnownNeverLogicalPosZero(DenormalMode Mode) const;
88+
LLVM_ABI bool isKnownNeverLogicalPosZero(DenormalMode Mode) const;
8889

8990
static constexpr FPClassTest OrderedLessThanZeroMask =
9091
fcNegSubnormal | fcNegNormal | fcNegInf;
@@ -209,15 +210,15 @@ struct KnownFPClass {
209210
///
210211
/// This assumes a copy-like operation and will replace any currently known
211212
/// information.
212-
void propagateDenormal(const KnownFPClass &Src, DenormalMode Mode);
213+
LLVM_ABI void propagateDenormal(const KnownFPClass &Src, DenormalMode Mode);
213214

214215
/// Report known classes if \p Src is evaluated through a potentially
215216
/// canonicalizing operation. We can assume signaling nans will not be
216217
/// introduced, but cannot assume a denormal will be flushed under FTZ/DAZ.
217218
///
218219
/// This assumes a copy-like operation and will replace any currently known
219220
/// information.
220-
void propagateCanonicalizingSrc(const KnownFPClass &Src, DenormalMode Mode);
221+
LLVM_ABI void propagateCanonicalizingSrc(const KnownFPClass &Src, DenormalMode Mode);
221222

222223
void resetAll() { *this = KnownFPClass(); }
223224
};

llvm/include/llvm/Support/ProgramStack.h

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

12+
#include "llvm/Support/Compiler.h"
1213
#include "llvm/ADT/STLFunctionalExtras.h"
1314

1415
// LLVM_HAS_SPLIT_STACKS is exposed in the header because CrashRecoveryContext
@@ -28,12 +29,12 @@ namespace llvm {
2829
///
2930
/// The value is not guaranteed to point to anything specific. It can be used to
3031
/// estimate how much stack space has been used since the previous call.
31-
uintptr_t getStackPointer();
32+
LLVM_ABI uintptr_t getStackPointer();
3233

3334
/// \returns the default stack size for this platform.
3435
///
3536
/// Based on \p RLIMIT_STACK or the equivalent.
36-
unsigned getDefaultStackSize();
37+
LLVM_ABI unsigned getDefaultStackSize();
3738

3839
/// Runs Fn on a new stack of at least the given size.
3940
///
@@ -42,7 +43,7 @@ unsigned getDefaultStackSize();
4243
///
4344
/// The preferred implementation is split stacks on platforms that have a good
4445
/// debugging experience for them. On other platforms a new thread is used.
45-
void runOnNewStack(unsigned StackSize, function_ref<void()> Fn);
46+
LLVM_ABI void runOnNewStack(unsigned StackSize, function_ref<void()> Fn);
4647

4748
template <typename R, typename... Ts>
4849
std::enable_if_t<!std::is_same_v<R, void>, R>

llvm/include/llvm/Support/TextEncoding.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#ifndef LLVM_SUPPORT_TEXT_ENCODING_H
1616
#define LLVM_SUPPORT_TEXT_ENCODING_H
1717

18+
#include "llvm/Support/Compiler.h"
1819
#include "llvm/ADT/SmallString.h"
1920
#include "llvm/ADT/StringRef.h"
2021
#include "llvm/Config/config.h"
@@ -92,7 +93,7 @@ class TextEncodingConverter {
9293
/// \param[in] From the source character encoding
9394
/// \param[in] To the target character encoding
9495
/// \return a TextEncodingConverter instance or an error code
95-
static ErrorOr<TextEncodingConverter> create(TextEncoding From,
96+
LLVM_ABI static ErrorOr<TextEncodingConverter> create(TextEncoding From,
9697
TextEncoding To);
9798

9899
/// Creates a TextEncodingConverter instance.
@@ -101,7 +102,7 @@ class TextEncodingConverter {
101102
/// \param[in] From name of the source character encoding
102103
/// \param[in] To name of the target character encoding
103104
/// \return a TextEncodingConverter instance or an error code
104-
static ErrorOr<TextEncodingConverter> create(StringRef From, StringRef To);
105+
LLVM_ABI static ErrorOr<TextEncodingConverter> create(StringRef From, StringRef To);
105106

106107
TextEncodingConverter(const TextEncodingConverter &) = delete;
107108
TextEncodingConverter &operator=(const TextEncodingConverter &) = delete;

0 commit comments

Comments
 (0)