Skip to content

Commit d800ea7

Browse files
authoredNov 21, 2024··
Adjust MSVC disabled optimization pragmas to be _MSC_VER only (#116704)
Alter the #ifdef values from #110986 and #115292 to use _MSC_VER instead of _WIN32 to stop the pragmas being used on gcc/mingw builds Noticed by @mstorsjo
1 parent d23449d commit d800ea7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎clang/lib/AST/ByteCode/Interp.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ bool CheckBitCast(InterpState &S, CodePtr OpPC, bool HasIndeterminateBits,
15881588
}
15891589

15901590
// https://github.com/llvm/llvm-project/issues/102513
1591-
#if defined(_WIN32) && !defined(__clang__) && !defined(NDEBUG)
1591+
#if defined(_MSC_VER) && !defined(__clang__) && !defined(NDEBUG)
15921592
#pragma optimize("", off)
15931593
#endif
15941594
bool Interpret(InterpState &S, APValue &Result) {
@@ -1616,7 +1616,7 @@ bool Interpret(InterpState &S, APValue &Result) {
16161616
}
16171617
}
16181618
// https://github.com/llvm/llvm-project/issues/102513
1619-
#if defined(_WIN32) && !defined(__clang__) && !defined(NDEBUG)
1619+
#if defined(_MSC_VER) && !defined(__clang__) && !defined(NDEBUG)
16201620
#pragma optimize("", on)
16211621
#endif
16221622

‎llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ using namespace llvm;
3232
#define PASS_NAME "AArch64 Instruction Selection"
3333

3434
// https://github.com/llvm/llvm-project/issues/114425
35-
#if defined(_WIN32) && !defined(__clang__) && !defined(NDEBUG)
35+
#if defined(_MSC_VER) && !defined(__clang__) && !defined(NDEBUG)
3636
#pragma inline_depth(0)
3737
#endif
3838

0 commit comments

Comments
 (0)
Please sign in to comment.