This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Consider MangleCtx when move lazy emission States
ClosedPublic

Authored by junaire on Jul 23 2022, 5:28 AM.

Details

Summary

Also move MangleCtx when moving some lazy emission states in
CodeGenModule. Without this patch clang-repl hits an invalid address
access when passing -Xcc -O2 flag.

Signed-off-by: Jun Zhang <jun@junz.org>

Diff Detail

Event Timeline

junaire created this revision.Jul 23 2022, 5:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2022, 5:28 AM
junaire requested review of this revision.Jul 23 2022, 5:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2022, 5:28 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Let's add more reviewers.

rjmccall accepted this revision.Jul 25 2022, 11:30 AM

I think this seems reasonable. I suspect we'll need to do more plumbing here if we need to support snapshotting / resetting to a snapshot, but this probably isn't the only place, and the moves we're doing aren't set up for that either.

This revision is now accepted and ready to land.Jul 25 2022, 11:30 AM
This revision was landed with ongoing or failed builds.Jul 25 2022, 9:44 PM
This revision was automatically updated to reflect the committed changes.