aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfPrinter.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
index 495e1be58d..a224db8400 100644
--- a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
@@ -39,20 +39,16 @@ DwarfPrinter::DwarfPrinter(AsmPrinter *A)
void DwarfPrinter::EmitSectionOffset(const MCSymbol *Label,
- const MCSymbol *Section, bool IsSmall) {
- bool isAbsolute = MAI->isAbsoluteDebugSectionOffsets();
-
- if (!isAbsolute)
- return Asm->EmitLabelDifference(Label, Section,
- IsSmall ? 4 : TD->getPointerSize());
+ const MCSymbol *Section) {
+ if (!MAI->isAbsoluteDebugSectionOffsets())
+ return Asm->EmitLabelDifference(Label, Section, 4);
// On COFF targets, we have to emit the weird .secrel32 directive.
if (const char *SecOffDir = MAI->getDwarfSectionOffsetDirective()) {
// FIXME: MCize.
Asm->OutStreamer.EmitRawText(SecOffDir + Twine(Label->getName()));
} else {
- unsigned Size = IsSmall ? 4 : TD->getPointerSize();
- Asm->OutStreamer.EmitSymbolValue(Label, Size, 0/*AddrSpace*/);
+ Asm->OutStreamer.EmitSymbolValue(Label, 4, 0/*AddrSpace*/);
}
}