From cf08570476011470501f43636f04d2f26b9ac951 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 10 Mar 2015 04:28:09 +0000 Subject: [PATCH] Move variable into assert to fix -Asserts builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231753 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp index 50047c1ab71..155aade65e1 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp @@ -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. -- 2.34.1