This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Fix incorrect dbg.declare when nrvo flag is used

Authored by nikic on Aug 28 2023, 2:42 AM.



When clang generates an nrvo boolean flag, the dbg.declare for the corresponding variable was incorrectly placed on that flag, rather than the actual variable.

Fix this by not overwriting AllocaAddr with the nrvo flag.

This started causing verifier errors with D158743.

Diff Detail