Skip to content

Commit 3081a1e

Browse files
committed
Namespace #defines that weren't SWIFT_-prefixed.
NFC
1 parent 94b79df commit 3081a1e

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

include/swift/Runtime/Mutex.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ class StaticConditionVariable {
392392
StaticConditionVariable &operator=(StaticConditionVariable &&) = delete;
393393

394394
public:
395-
#if CONDITION_SUPPORTS_CONSTEXPR
395+
#if SWIFT_CONDITION_SUPPORTS_CONSTEXPR
396396
constexpr
397397
#endif
398398
StaticConditionVariable()
@@ -420,7 +420,7 @@ class StaticMutex {
420420
StaticMutex &operator=(StaticMutex &&) = delete;
421421

422422
public:
423-
#if MUTEX_SUPPORTS_CONSTEXPR
423+
#if SWIFT_MUTEX_SUPPORTS_CONSTEXPR
424424
constexpr
425425
#endif
426426
StaticMutex()
@@ -495,7 +495,7 @@ class StaticReadWriteLock {
495495
StaticReadWriteLock &operator=(StaticReadWriteLock &&) = delete;
496496

497497
public:
498-
#if READWRITELOCK_SUPPORTS_CONSTEXPR
498+
#if SWIFT_READWRITELOCK_SUPPORTS_CONSTEXPR
499499
constexpr
500500
#endif
501501
StaticReadWriteLock()
@@ -560,7 +560,7 @@ class StaticUnsafeMutex {
560560
StaticUnsafeMutex &operator=(StaticUnsafeMutex &&) = delete;
561561

562562
public:
563-
#if MUTEX_SUPPORTS_CONSTEXPR
563+
#if SWIFT_MUTEX_SUPPORTS_CONSTEXPR
564564
constexpr
565565
#endif
566566
StaticUnsafeMutex()
@@ -714,7 +714,7 @@ typedef ScopedRWLockT<ReadWriteLock, false, true> ScopedWriteUnlock;
714714
typedef ScopedRWLockT<StaticReadWriteLock, false, true> StaticScopedWriteUnlock;
715715

716716
// Enforce literal requirements for static variants.
717-
#if MUTEX_SUPPORTS_CONSTEXPR
717+
#if SWIFT_MUTEX_SUPPORTS_CONSTEXPR
718718
static_assert(std::is_literal_type<StaticMutex>::value,
719719
"StaticMutex must be literal type");
720720
static_assert(std::is_literal_type<StaticUnsafeMutex>::value,
@@ -724,15 +724,15 @@ static_assert(std::is_literal_type<StaticUnsafeMutex>::value,
724724
// you will possibly see global-constructors warnings
725725
#endif
726726

727-
#if CONDITION_SUPPORTS_CONSTEXPR
727+
#if SWIFT_CONDITION_SUPPORTS_CONSTEXPR
728728
static_assert(std::is_literal_type<StaticConditionVariable>::value,
729729
"StaticConditionVariable must be literal type");
730730
#else
731731
// Your platform doesn't currently support statically allocated ConditionVar
732732
// you will possibly see global-constructors warnings
733733
#endif
734734

735-
#if READWRITELOCK_SUPPORTS_CONSTEXPR
735+
#if SWIFT_READWRITELOCK_SUPPORTS_CONSTEXPR
736736
static_assert(std::is_literal_type<StaticReadWriteLock>::value,
737737
"StaticReadWriteLock must be literal type");
738738
#else

include/swift/Runtime/MutexPThread.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@ typedef pthread_rwlock_t ReadWriteLockHandle;
3232
// results in a reinterpret_cast which violates constexpr. Similarly, Android's
3333
// pthread implementation makes use of volatile attributes that prevent it from
3434
// being marked as constexpr.
35-
#define CONDITION_SUPPORTS_CONSTEXPR 0
36-
#define MUTEX_SUPPORTS_CONSTEXPR 0
37-
#define READWRITELOCK_SUPPORTS_CONSTEXPR 0
35+
#define SWIFT_CONDITION_SUPPORTS_CONSTEXPR 0
36+
#define SWIFT_MUTEX_SUPPORTS_CONSTEXPR 0
37+
#define SWIFT_READWRITELOCK_SUPPORTS_CONSTEXPR 0
3838
#else
39-
#define CONDITION_SUPPORTS_CONSTEXPR 1
40-
#define MUTEX_SUPPORTS_CONSTEXPR 1
41-
#define READWRITELOCK_SUPPORTS_CONSTEXPR 1
39+
#define SWIFT_CONDITION_SUPPORTS_CONSTEXPR 1
40+
#define SWIFT_MUTEX_SUPPORTS_CONSTEXPR 1
41+
#define SWIFT_READWRITELOCK_SUPPORTS_CONSTEXPR 1
4242
#endif
4343

4444
/// PThread low-level implementation that supports ConditionVariable
4545
/// found in Mutex.h
4646
///
4747
/// See ConditionVariable
4848
struct ConditionPlatformHelper {
49-
#if CONDITION_SUPPORTS_CONSTEXPR
49+
#if SWIFT_CONDITION_SUPPORTS_CONSTEXPR
5050
static constexpr
5151
#else
5252
static
@@ -67,7 +67,7 @@ struct ConditionPlatformHelper {
6767
///
6868
/// See Mutex
6969
struct MutexPlatformHelper {
70-
#if MUTEX_SUPPORTS_CONSTEXPR
70+
#if SWIFT_MUTEX_SUPPORTS_CONSTEXPR
7171
static constexpr
7272
#else
7373
static
@@ -96,7 +96,7 @@ struct MutexPlatformHelper {
9696
///
9797
/// See ReadWriteLock
9898
struct ReadWriteLockPlatformHelper {
99-
#if READWRITELOCK_SUPPORTS_CONSTEXPR
99+
#if SWIFT_READWRITELOCK_SUPPORTS_CONSTEXPR
100100
static constexpr
101101
#else
102102
static

include/swift/Runtime/MutexWin32.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ typedef CONDITION_VARIABLE ConditionHandle;
2828
typedef SRWLOCK MutexHandle;
2929
typedef SRWLOCK ReadWriteLockHandle;
3030

31-
#define CONDITION_SUPPORTS_CONSTEXPR 1
32-
#define MUTEX_SUPPORTS_CONSTEXPR 1
33-
#define READWRITELOCK_SUPPORTS_CONSTEXPR 1
31+
#define SWIFT_CONDITION_SUPPORTS_CONSTEXPR 1
32+
#define SWIFT_MUTEX_SUPPORTS_CONSTEXPR 1
33+
#define SWIFT_READWRITELOCK_SUPPORTS_CONSTEXPR 1
3434

3535
struct ConditionPlatformHelper {
3636
static constexpr ConditionHandle staticInit() {

0 commit comments

Comments
 (0)