[PATCH] Use a single data structure to store all user variables in DwarfDebug

David Blaikie dblaikie at gmail.com
Wed Apr 30 16:01:55 PDT 2014


================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1207
@@ -1205,3 +1206,3 @@
 
     DIVariable DV(Var);
     LexicalScope *Scope = nullptr;
----------------
You can probably push DIVariable DV(Var) up to DIVariable DV(I.first) and Processed.count(DV) (I think the implicit conversion to MDNode* will work out here). Just to avoid having that raw MDNode* lying around.

Not necessary, up to you if you want to do it at all and either in this commit or separately.

================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1453
@@ -1449,3 +1452,3 @@
         const MDNode *Var = MI.getDebugVariable();
-        auto IterPair = DbgValues.insert(
+        DbgValues.insert(
             std::make_pair(Var, SmallVector<const MachineInstr *, 4>()));
----------------
Looks great & makes a lot more sense to me now.

http://reviews.llvm.org/D3579






More information about the llvm-commits mailing list