[PATCH] Simplify arange output
    David Blaikie 
    dblaikie at gmail.com
       
    Thu Feb 26 13:38:38 PST 2015
    
    
  
Looks good -thanks! sorry for the delay
(some optional/follow-up comments provided)
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1754
@@ -1807,4 +1753,3 @@
 void DwarfDebug::emitDebugARanges() {
-  // Start the dwarf aranges section.
-  Asm->OutStreamer.SwitchSection(
-      Asm->getObjFileLowering().getDwarfARangesSection());
+  // Provides a unique id per text section.
+  typedef DenseMap<const MCSection *, SmallVector<SymbolCU, 8>> SectionMapType;
----------------
Refactoring might've been easier to understand if these two chunks had been pulled out into functions first, then the calls moved. (& might keep this function from getting quite so long/make it easier to read if there are some good names for these chunks of code (probably taken from the comment text))
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1806
@@ +1805,3 @@
+
+  typedef DenseMap<DwarfCompileUnit *, std::vector<ArangeSpan>> SpansType;
+
----------------
Don't really need this typedef, it's only used once.
http://reviews.llvm.org/D7347
EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
    
    
More information about the llvm-commits
mailing list