This is an archive of the discontinued LLVM Phabricator instance.

[clang][Interp] Don't create global variables more than once
ClosedPublic

Authored by tbaeder on Apr 4 2023, 7:40 AM.

Details

Summary
just because we're being told to evaluate it twice. This sometimes
happens when a variable is evaluated again during codegen.

Diff Detail

Event Timeline

tbaeder created this revision.Apr 4 2023, 7:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2023, 7:40 AM
tbaeder requested review of this revision.Apr 4 2023, 7:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2023, 7:40 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman accepted this revision.Apr 7 2023, 7:41 AM

I keep trying to find some way to test this change... and instead, I've filed several new crashing issues in the issue tracker. The changes look correct to me despite the lack of a test, but if anyone else can dream up some way to tell a ctor is being called twice instead of once, that would be great. If not, LGTM otherwise.

This revision is now accepted and ready to land.Apr 7 2023, 7:41 AM