[llvm] r231753 - Move variable into assert to fix -Asserts builds.

Rafael Espindola rafael.espindola at gmail.com
Mon Mar 9 21:28:09 PDT 2015


Author: rafael
Date: Mon Mar  9 23:28:09 2015
New Revision: 231753

URL: http://llvm.org/viewvc/llvm-project?rev=231753&view=rev
Log:
Move variable into assert to fix -Asserts builds.

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

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp?rev=231753&r1=231752&r2=231753&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Mon Mar  9 23:28:09 2015
@@ -171,12 +171,10 @@ void AsmPrinter::EmitSectionOffset(const
     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.





More information about the llvm-commits mailing list