[PATCH] D43387: [DebugInfo] Removed assert on missing CountVarDIE
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 16 08:39:10 PST 2018
aprantl added inline comments.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1391
+ else if (Count != -1)
addUInt(DW_Subrange, dwarf::DW_AT_count, None, Count);
}
----------------
Why not:
```
if (auto *CV = SR->getCount().dyn_cast<DIVariable*>()) {
if (DIE *CountVarDIE = getDIE(CV))
addDIEEntry(DW_Subrange, dwarf::DW_AT_count, *CountVarDIE);
else
// should this. case be handled?
} else if (Count != -1)
addUInt(DW_Subrange, dwarf::DW_AT_count, None, Count);
```
https://reviews.llvm.org/D43387
More information about the llvm-commits
mailing list