Skip to content

Commit 5c8114d

Browse files
authored
Merge pull request swiftlang#39125 from compnerd/atomic-inclusion
Runtime: correct the location of windows header inclusion
2 parents 72ff115 + 74496f3 commit 5c8114d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/swift/Runtime/Atomic.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
#include "swift/Runtime/Config.h"
2121
#include <assert.h>
2222
#include <atomic>
23+
#if defined(_WIN64)
24+
#include <intrin.h>
25+
#endif
2326

2427
// FIXME: Workaround for rdar://problem/18889711. 'Consume' does not require
2528
// a barrier on ARM64, but LLVM doesn't know that. Although 'relaxed'
@@ -72,7 +75,6 @@ class alignas(Size) atomic_impl {
7275
};
7376

7477
#if defined(_WIN64)
75-
#include <intrin.h>
7678

7779
/// MSVC's std::atomic uses an inline spin lock for 16-byte atomics,
7880
/// which is not only unnecessarily inefficient but also doubles the size

0 commit comments

Comments
 (0)