[llvm] r190440 - Hoist section call out of loop.

Eric Christopher echristo at gmail.com
Tue Sep 10 14:49:37 PDT 2013


Author: echristo
Date: Tue Sep 10 16:49:37 2013
New Revision: 190440

URL: http://llvm.org/viewvc/llvm-project?rev=190440&view=rev
Log:
Hoist section call out of loop.

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=190440&r1=190439&r2=190440&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Sep 10 16:49:37 2013
@@ -2284,6 +2284,7 @@ void DwarfDebug::emitAccelTypes() {
 ///
 void DwarfDebug::emitDebugPubNames() {
   const MCSection *ISec = Asm->getObjFileLowering().getDwarfInfoSection();
+  const MCSection *PSec = Asm->getObjFileLowering().getDwarfPubNamesSection();
 
   typedef DenseMap<const MDNode*, CompileUnit*> CUMapType;
   for (CUMapType::iterator I = CUMap.begin(), E = CUMap.end(); I != E; ++I) {
@@ -2294,8 +2295,7 @@ void DwarfDebug::emitDebugPubNames() {
       continue;
 
     // Start the dwarf pubnames section.
-    Asm->OutStreamer
-        .SwitchSection(Asm->getObjFileLowering().getDwarfPubNamesSection());
+    Asm->OutStreamer.SwitchSection(PSec);
 
     Asm->OutStreamer.AddComment("Length of Public Names Info");
     Asm->EmitLabelDifference(Asm->GetTempSymbol("pubnames_end", ID),





More information about the llvm-commits mailing list