[llvm-commits] [llvm] r100364 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
Chris Lattner
sabre at nondot.org
Sun Apr 4 16:06:31 PDT 2010
Author: lattner
Date: Sun Apr 4 18:06:31 2010
New Revision: 100364
URL: http://llvm.org/viewvc/llvm-project?rev=100364&view=rev
Log:
add some assertions to EmitSectionOffset.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp?rev=100364&r1=100363&r2=100364&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp Sun Apr 4 18:06:31 2010
@@ -54,6 +54,14 @@
Asm->OutStreamer.EmitRawText(SecOffDir + Twine(Label->getName()));
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) &&
+ "Section offset using wrong section base for label"); (void)Section;
// If the section in question will end up with an address of 0 anyway, we can
// just emit an absolute reference to save a relocation.
More information about the llvm-commits
mailing list