From: bd1976bris Date: Sun, 6 Oct 2024 21:47:02 +0000 (+0100) Subject: [MSVC] work-around for compile time issue 102513 X-Git-Tag: upstream/19.1.4~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9fdf91271a9ab72090a6d4839d6a96d017218e3c;p=platform%2Fupstream%2Fllvm.git [MSVC] work-around for compile time issue 102513 Manual cherry-pick of #110986 to the LLVM 19 release branch. --- diff --git a/clang/lib/AST/Interp/Interp.cpp b/clang/lib/AST/Interp/Interp.cpp index 6fcd90e5f584..0f9eedc3f38e 100644 --- a/clang/lib/AST/Interp/Interp.cpp +++ b/clang/lib/AST/Interp/Interp.cpp @@ -925,6 +925,10 @@ void diagnoseEnumValue(InterpState &S, CodePtr OpPC, const EnumDecl *ED, } } +// https://github.com/llvm/llvm-project/issues/102513 +#if defined(_WIN32) && !defined(__clang__) && !defined(NDEBUG) +#pragma optimize("", off) +#endif bool Interpret(InterpState &S, APValue &Result) { // The current stack frame when we started Interpret(). // This is being used by the ops to determine wheter @@ -949,6 +953,10 @@ bool Interpret(InterpState &S, APValue &Result) { } } } +// https://github.com/llvm/llvm-project/issues/102513 +#if defined(_WIN32) && !defined(__clang__) && !defined(NDEBUG) +#pragma optimize("", on) +#endif } // namespace interp } // namespace clang