diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-04 21:34:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-04 21:34:40 +0000 |
commit | 83d1618b462ae42b61cfa366d090792eb10f05c6 (patch) | |
tree | ccece8ebfc9c3acf89e55d159b6b3176c53e864c /lib/CodeGen/AsmPrinter/DwarfPrinter.cpp | |
parent | f88dce1f89ddb30b2370318284a6b307d7a44a98 (diff) |
The "IsSmall" argument to EmitSectionOffset is always true,
constant fold it away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfPrinter.cpp | 12 |
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*/); } } |