Skip to content

[MSVC] work-around for compile time issue 102513 #111314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bd1976bris
Copy link
Collaborator

Manual cherry-pick of #110986 to the LLVM 19 release branch.

@bd1976bris bd1976bris requested a review from tbaederr as a code owner October 6, 2024 21:47
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Oct 6, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 6, 2024

@llvm/pr-subscribers-clang

Author: bd1976bris (bd1976bris)

Changes

Manual cherry-pick of #110986 to the LLVM 19 release branch.


Full diff: https://github.com/llvm/llvm-project/pull/111314.diff

1 Files Affected:

  • (modified) clang/lib/AST/Interp/Interp.cpp (+8)
diff --git a/clang/lib/AST/Interp/Interp.cpp b/clang/lib/AST/Interp/Interp.cpp
index 6fcd90e5f58498..0f9eedc3f38ea1 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

@bd1976bris bd1976bris requested a review from tru October 6, 2024 21:49
@bd1976bris
Copy link
Collaborator Author

@tru I'm unable to merge this even with approval. Perhaps this has been made against the wrong branch or 19.x now closed?

@tru
Copy link
Collaborator

tru commented Oct 7, 2024

@tru I'm unable to merge this even with approval. Perhaps this has been made against the wrong branch or 19.x now closed?

No it's correct. Only the release manager can merge to the release branch, I will do that before the next release.

@bd1976bris
Copy link
Collaborator Author

@tru I'm unable to merge this even with approval. Perhaps this has been made against the wrong branch or 19.x now closed?

No it's correct. Only the release manager can merge to the release branch, I will do that before the next release.

Thanks very much!

@bd1976bris
Copy link
Collaborator Author

@tru should this have been merged? Do I need to do something to facilitate? Sorry for not following up earlier I have been sick recently. Thanks.

@nikic nikic added this to the LLVM 19.X Release milestone Nov 18, 2024
@nikic
Copy link
Contributor

nikic commented Nov 18, 2024

@tru should this have been merged? Do I need to do something to facilitate? Sorry for not following up earlier I have been sick recently. Thanks.

Backport PRs need to be part of the release milestone, otherwise they're likely to get forgotten about :) I added it just now.

@tru tru force-pushed the bd1976bris/release/19.x/issue-102513 branch from c4b52d9 to 9fdf912 Compare November 18, 2024 16:04
@tru tru merged commit 9fdf912 into llvm:release/19.x Nov 18, 2024
Manual cherry-pick of llvm#110986 to the LLVM 19 release branch.
Copy link

@bd1976bris (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
Development

Successfully merging this pull request may close these issues.

5 participants