Skip to content

Commit

Permalink
[MSVC] work-around for compile time issue 102513
Browse files Browse the repository at this point in the history
Manual cherry-pick of #110986 to the LLVM 19 release branch.
  • Loading branch information
bd1976bris authored and tru committed Nov 18, 2024
1 parent 54bc386 commit 9fdf912
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions clang/lib/AST/Interp/Interp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 9fdf912

Please sign in to comment.