Skip to content

Commit c7892d0

Browse files
bd1976brisnikic
authored andcommitted
[MSVC] work-around for compile time issue 102513
Manual cherry-pick of llvm#110986 to the LLVM 19 release branch.
1 parent a9c683a commit c7892d0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: clang/lib/AST/Interp/Interp.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,10 @@ void diagnoseEnumValue(InterpState &S, CodePtr OpPC, const EnumDecl *ED,
925925
}
926926
}
927927

928+
// https://github.com/llvm/llvm-project/issues/102513
929+
#if defined(_WIN32) && !defined(__clang__) && !defined(NDEBUG)
930+
#pragma optimize("", off)
931+
#endif
928932
bool Interpret(InterpState &S, APValue &Result) {
929933
// The current stack frame when we started Interpret().
930934
// This is being used by the ops to determine wheter
@@ -949,6 +953,10 @@ bool Interpret(InterpState &S, APValue &Result) {
949953
}
950954
}
951955
}
956+
// https://github.com/llvm/llvm-project/issues/102513
957+
#if defined(_WIN32) && !defined(__clang__) && !defined(NDEBUG)
958+
#pragma optimize("", on)
959+
#endif
952960

953961
} // namespace interp
954962
} // namespace clang

0 commit comments

Comments
 (0)