This is an archive of the discontinued LLVM Phabricator instance.

Don't crash generating debug info for VLA in function prototype.
ClosedPublic

Authored by efriedma on Oct 19 2016, 2:14 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma updated this revision to Diff 75219.Oct 19 2016, 2:14 PM
efriedma retitled this revision from to Don't crash generating debug info for VLA in function prototype..
efriedma updated this object.
efriedma added a reviewer: dblaikie.
efriedma set the repository for this revision to rL LLVM.
efriedma added a subscriber: cfe-commits.
dblaikie accepted this revision.Oct 19 2016, 2:23 PM
dblaikie edited edge metadata.
dblaikie added inline comments.
lib/CodeGen/CGDebugInfo.cpp
2183–2185 ↗(On Diff #75219)

You could declare a variable in the new/first if so you don't have to query for the exprsize a second time.

Or you could roll the first if into the second if you want to reduce indentation of the assignment.

Neither's something I find necessary, though - just some thoughts.

This revision is now accepted and ready to land.Oct 19 2016, 2:23 PM
This revision was automatically updated to reflect the committed changes.