[PATCH] D87406: [DebugInfo] Fixing CodeView assert related to lowerBound field of DISubrange.
Alok Kumar Sharma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 13:13:35 PDT 2020
alok marked an inline comment as done.
alok added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:1588-1589
+
int64_t Count = -1;
if (auto *CI = Subrange->getCount().dyn_cast<ConstantInt*>())
Count = CI->getSExtValue();
----------------
rnk wrote:
> I think we should handle the presence of anything we don't understand (non-zero lower bound, stride, and upper bound) as a VLA. As in, translate it to an array count of -1. That's how we can eliminate the assertion. If the user tries to emit codeview when compiling fortran with these types of arrays, they would probably prefer to have an array bound of zero in their debug info than for the compiler to crash.
>
> I should've provided that guidance during the original review when this code landed. The author was trying to be cautious.
Thanks for your comment. I shall update the patch and request you to have a look at updated patch and share your feedback.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87406/new/
https://reviews.llvm.org/D87406
More information about the llvm-commits
mailing list