mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-10 02:25:47 +00:00
add some assertions to EmitSectionOffset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -55,6 +55,14 @@ void DwarfPrinter::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) &&
|
||||
"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.
|
||||
if (MAI->isAbsoluteDebugSectionOffsets()) {
|
||||
|
Reference in New Issue
Block a user