[PATCH] D25793: Don't crash generating debug info for VLA in function prototype.
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 14:23:15 PDT 2016
dblaikie accepted this revision.
dblaikie added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/CodeGen/CGDebugInfo.cpp:2183-2185
+ if (VAT->getSizeExpr()) {
+ llvm::APSInt V;
+ if (VAT->getSizeExpr()->EvaluateAsInt(V, CGM.getContext()))
----------------
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.
Repository:
rL LLVM
https://reviews.llvm.org/D25793
More information about the cfe-commits
mailing list