Move variable into assert to fix -Asserts builds.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 10 Mar 2015 04:28:09 +0000 (04:28 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 10 Mar 2015 04:28:09 +0000 (04:28 +0000)
llvm-svn: 231753

llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp

index 50047c1..155aade 100644 (file)
@@ -171,12 +171,10 @@ void AsmPrinter::EmitSectionOffset(const MCSymbol *Label,
     return;
   }
 
-  // Get the section that we're referring to, based on SectionLabel.
-  const MCSection &Section = SectionLabel->getSection();
-
   // If Label has already been emitted, verify that it is in the same section as
   // section label for sanity.
-  assert((!Label->isInSection() || &Label->getSection() == &Section) &&
+  assert((!Label->isInSection() ||
+          &Label->getSection() == &SectionLabel->getSection()) &&
          "Section offset using wrong section base for label");
 
   // If the format uses relocations with dwarf, refer to the symbol directly.