Skip to content

Commit 1d46e09

Browse files
committed
Demangling: degrade better with VS2017
`_Pragma` support was added to VS with VS2019 U6, version 16.6, toolset 14.26. Add a conditional to avoid the use of `_Pragma` prior to that version.
1 parent 8866a2d commit 1d46e09

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/swift/Demangling/ManglingMacros.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@
1717
#define MANGLE_AS_STRING(M) STRINGIFY_MANGLING(M)
1818

1919
/// The mangling prefix for the new mangling.
20+
#if !defined(_MSC_VER) || _MSC_VER-0 >= 1926
2021
_Pragma("clang diagnostic push")
2122
_Pragma("clang diagnostic ignored \"-Wdollar-in-identifier-extension\"")
23+
#endif
2224
#define MANGLING_PREFIX $s
25+
#if !defined(_MSC_VER) || _MSC_VER-0 >= 1926
2326
_Pragma("clang diagnostic pop")
27+
#endif
2428

2529
#define MANGLING_PREFIX_STR MANGLE_AS_STRING(MANGLING_PREFIX)
2630

0 commit comments

Comments
 (0)