File tree Expand file tree Collapse file tree 8 files changed +16
-16
lines changed Expand file tree Collapse file tree 8 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ class AnyFunctionRef {
152
152
}
153
153
154
154
// Disable "only for use within the debugger" warning.
155
- #if COMPILER_IS_MSVC
155
+ #if SWIFT_COMPILER_IS_MSVC
156
156
#pragma warning(push)
157
157
#pragma warning(disable: 4996)
158
158
#endif
@@ -177,7 +177,7 @@ class AnyFunctionRef {
177
177
llvm_unreachable (" unexpected AnyFunctionRef representation" );
178
178
}
179
179
};
180
- #if COMPILER_IS_MSVC
180
+ #if SWIFT_COMPILER_IS_MSVC
181
181
#pragma warning(pop)
182
182
#endif
183
183
Original file line number Diff line number Diff line change 14
14
#define SWIFT_BASIC_COMPILER_H
15
15
16
16
#if defined(_MSC_VER) && !defined(__clang__)
17
- #define COMPILER_IS_MSVC 1
17
+ #define SWIFT_COMPILER_IS_MSVC 1
18
18
#else
19
- #define COMPILER_IS_MSVC 0
19
+ #define SWIFT_COMPILER_IS_MSVC 0
20
20
#endif
21
21
22
- #if COMPILER_IS_MSVC
22
+ #if SWIFT_COMPILER_IS_MSVC
23
23
// Work around MSVC bug: attempting to reference a deleted function
24
24
// https://connect.microsoft.com/VisualStudio/feedback/details/3116505
25
25
#define SWIFT_DELETE_OPERATOR_DELETED \
Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ class EncodedSequence : public EncodedSequenceBase {
340
340
template <class ValueType > class Map {
341
341
// Hack: MSVC isn't able to resolve the InlineKeyCapacity part of the
342
342
// template of PrefixMap, so we have to split it up and pass it manually.
343
- #if COMPILER_IS_MSVC
343
+ #if SWIFT_COMPILER_IS_MSVC
344
344
static const size_t Size = (sizeof (void *) - 1 ) / sizeof (Chunk);
345
345
static const size_t ActualSize = max<size_t >(Size, 1 );
346
346
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ namespace swift {
30
30
// / is not intended to be specialized.
31
31
template <typename T>
32
32
struct IsTriviallyCopyable {
33
- #if _LIBCPP_VERSION || COMPILER_IS_MSVC
33
+ #if _LIBCPP_VERSION || SWIFT_COMPILER_IS_MSVC
34
34
// libc++ and MSVC implement is_trivially_copyable.
35
35
static const bool value = std::is_trivially_copyable<T>::value;
36
36
#elif __has_feature(is_trivially_copyable)
@@ -42,7 +42,7 @@ struct IsTriviallyCopyable {
42
42
43
43
template <typename T>
44
44
struct IsTriviallyConstructible {
45
- #if _LIBCPP_VERSION || COMPILER_IS_MSVC
45
+ #if _LIBCPP_VERSION || SWIFT_COMPILER_IS_MSVC
46
46
// libc++ and MSVC implement is_trivially_constructible.
47
47
static const bool value = std::is_trivially_constructible<T>::value;
48
48
#elif __has_feature(has_trivial_constructor)
@@ -54,7 +54,7 @@ struct IsTriviallyConstructible {
54
54
55
55
template <typename T>
56
56
struct IsTriviallyDestructible {
57
- #if _LIBCPP_VERSION || COMPILER_IS_MSVC
57
+ #if _LIBCPP_VERSION || SWIFT_COMPILER_IS_MSVC
58
58
// libc++ and MSVC implement is_trivially_destructible.
59
59
static const bool value = std::is_trivially_destructible<T>::value;
60
60
#elif __has_feature(has_trivial_destructor)
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ namespace swift {
23
23
24
24
// Disable MSVC warning: multiple copy constructors specified.
25
25
// TODO: silence this warning.
26
- #if COMPILER_IS_MSVC
26
+ #if SWIFT_COMPILER_IS_MSVC
27
27
#pragma warning(push)
28
28
#pragma warning(disable: 4521)
29
29
#endif
@@ -136,7 +136,7 @@ class SILOpenedArchetypesTracker : public DeleteNotificationHandler {
136
136
OpenedArchetypeDefsMap LocalOpenedArchetypeDefs;
137
137
};
138
138
139
- #if COMPILER_IS_MSVC
139
+ #if SWIFT_COMPILER_IS_MSVC
140
140
#pragma warning(pop)
141
141
#endif
142
142
Original file line number Diff line number Diff line change @@ -278,12 +278,12 @@ struct ASTContext::Implementation {
278
278
conformance.~SpecializedProtocolConformance ();
279
279
// Work around MSVC warning: local variable is initialized but
280
280
// not referenced.
281
- #if COMPILER_IS_MSVC
281
+ #if SWIFT_COMPILER_IS_MSVC
282
282
#pragma warning (disable: 4189)
283
283
#endif
284
284
for (auto &conformance : InheritedConformances)
285
285
conformance.~InheritedProtocolConformance ();
286
- #if COMPILER_IS_MSVC
286
+ #if SWIFT_COMPILER_IS_MSVC
287
287
#pragma warning (default: 4189)
288
288
#endif
289
289
Original file line number Diff line number Diff line change @@ -843,7 +843,7 @@ namespace {
843
843
template <typename T>
844
844
struct OperatorLookup {
845
845
// TODO: this assertion fails in MSVC, but not clang-cl.
846
- #if !COMPILER_IS_MSVC
846
+ #if !SWIFT_COMPILER_IS_MSVC
847
847
static_assert (static_cast <T*>(nullptr ), "Only usable with operators");
848
848
#endif
849
849
};
Original file line number Diff line number Diff line change @@ -334,12 +334,12 @@ void Constraint::dump(ConstraintSystem *CS) const {
334
334
llvm::SaveAndRestore<bool > X (CS->getASTContext ().LangOpts .
335
335
DebugConstraintSolver, true );
336
336
// Disable MSVC warning: only for use within the debugger.
337
- #if COMPILER_IS_MSVC
337
+ #if SWIFT_COMPILER_IS_MSVC
338
338
#pragma warning(push)
339
339
#pragma warning(disable: 4996)
340
340
#endif
341
341
dump (&CS->getASTContext ().SourceMgr );
342
- #if COMPILER_IS_MSVC
342
+ #if SWIFT_COMPILER_IS_MSVC
343
343
#pragma warning(pop)
344
344
#endif
345
345
}
You can’t perform that action at this time.
0 commit comments