[llvm] r185498 - Move iterator to where it's used and update comments.

Eric Christopher echristo at gmail.com
Tue Jul 2 18:57:29 PDT 2013


Author: echristo
Date: Tue Jul  2 20:57:28 2013
New Revision: 185498

URL: http://llvm.org/viewvc/llvm-project?rev=185498&view=rev
Log:
Move iterator to where it's used and update comments.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=185498&r1=185497&r2=185498&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Jul  2 20:57:28 2013
@@ -443,7 +443,7 @@ DIE *DwarfDebug::constructLexicalScopeDI
   if (Ranges.empty())
     return 0;
 
-  SmallVector<InsnRange, 4>::const_iterator RI = Ranges.begin();
+  // If we have multiple ranges, emit them into the range section.
   if (Ranges.size() > 1) {
     // .debug_range section has not been laid out yet. Emit offset in
     // .debug_range as a uint, size 4, for now. emitDIE will handle
@@ -463,6 +463,8 @@ DIE *DwarfDebug::constructLexicalScopeDI
     return ScopeDIE;
   }
 
+  // Construct the address range for this DIE.
+  SmallVector<InsnRange, 4>::const_iterator RI = Ranges.begin();
   MCSymbol *Start = getLabelBeforeInsn(RI->first);
   MCSymbol *End = getLabelAfterInsn(RI->second);
 





More information about the llvm-commits mailing list