diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-08 23:23:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-08 23:23:25 +0000 |
commit | 57578766aa33d1a22cd124316df318db3e44f34a (patch) | |
tree | 8723353009d053edbed7467d873f9d355872b1ca /lib/CodeGen/AsmPrinter/DwarfPrinter.cpp | |
parent | 82f05078b08f086b868e096ff0bb89324ca5c1d5 (diff) |
simplify EmitSectionOffset to always use .set if it is
available, the only thing this affects is that we produce
.set in one case we didn't before, which shouldn't harm
anything. Make EmitSectionOffset call EmitDifference
instead of duplicating it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98005 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfPrinter.cpp | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp index 23b2158272..52a4055d15 100644 --- a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp @@ -278,39 +278,18 @@ void DwarfPrinter::EmitDifference(const MCSymbol *TagHi, const MCSymbol *TagLo, void DwarfPrinter::EmitSectionOffset(const MCSymbol *Label, const MCSymbol *Section, - bool IsSmall, bool isEH, - bool useSet) { + bool IsSmall, bool isEH) { bool printAbsolute = false; if (isEH) printAbsolute = MAI->isAbsoluteEHSectionOffsets(); else printAbsolute = MAI->isAbsoluteDebugSectionOffsets(); - if (MAI->hasSetDirective() && useSet) { - // FIXME: switch to OutStreamer.EmitAssignment. - O << "\t.set\t"; - PrintLabelName("set", SetCounter, Flavor); - O << ","; - PrintLabelName(Label); - - if (!printAbsolute) { - O << "-"; - PrintLabelName(Section); - } - - O << "\n"; - PrintRelDirective(IsSmall); - PrintLabelName("set", SetCounter, Flavor); - ++SetCounter; - } else { - PrintRelDirective(IsSmall, true); - PrintLabelName(Label); - - if (!printAbsolute) { - O << "-"; - PrintLabelName(Section); - } - } + if (!printAbsolute) + return EmitDifference(Label, Section, IsSmall); + + PrintRelDirective(IsSmall, true); + PrintLabelName(Label); } /// EmitFrameMoves - Emit frame instructions to describe the layout of the |