[PATCH] D50495: [DebugInfo] Do not generate duplicated label debug info if it has been processed.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 10 16:01:24 PDT 2018


aprantl added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:1051
 void CodeViewDebug::collectVariableInfoFromMFTable(
-    DenseSet<InlinedVariable> &Processed) {
+    DenseSet<InlinedEntity> &Processed) {
   const MachineFunction &MF = *Asm->MF;
----------------
If this processes only variables, why return a set of InlinedEntities instead of InlinedVariables?


================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1505
+        Scope = DV->getScope();
+      else if (auto *DL = dyn_cast<DILabel>(DN))
+        Scope = DL->getScope();
----------------
this is equivalent to 
```
else {
  auto *DL = cast<DILabel>(DN); // llvm::cast asserts automatically.
  Scope = DL->getScope();
}


Repository:
  rL LLVM

https://reviews.llvm.org/D50495





More information about the llvm-commits mailing list