[DebugInfo] Fixing CodeView assert related to lowerBound field of DISubrange.
authorAlok Kumar Sharma <AlokKumar.Sharma@amd.com>
Fri, 11 Sep 2020 05:41:39 +0000 (11:11 +0530)
committerSourabh Singh Tomar <SourabhSingh.Tomar@amd.com>
Fri, 11 Sep 2020 05:42:49 +0000 (11:12 +0530)
commite45b0708ae81ace27de53f12b32a80601cb12bf3
tree59587048e68b851478979b21f6657c2c1a849934
parentda9244882804ec6479aac70334fd7f7b4baf855e
[DebugInfo] Fixing CodeView assert related to lowerBound field of DISubrange.

    This is to fix CodeView build failure https://bugs.llvm.org/show_bug.cgi?id=47287
    after DIsSubrange upgrade D80197

    Assert condition is now removed and Count is calculated in case LowerBound
    is absent or zero and Count or UpperBound is constant. If Count is unknown
    it is later handled as VLA (currently Count is set to zero).

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D87406
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp