diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-26 20:20:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-26 20:20:43 +0000 |
commit | 3dd38a81128a39811c40b52a3f7c3590897babe8 (patch) | |
tree | dcf441d7a30537c45490a88db73a44394a352a93 /llvm/lib | |
parent | 526f5604247adb49420b1c115ee1d9f15bf475e7 (diff) | |
download | bcm5719-llvm-3dd38a81128a39811c40b52a3f7c3590897babe8.tar.gz bcm5719-llvm-3dd38a81128a39811c40b52a3f7c3590897babe8.zip |
eliminate MCAsmInfo::NeedsSet: we now just use .set on any platform
that has it.
llvm-svn: 94581
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp | 9 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.h | 4 | ||||
-rw-r--r-- | llvm/lib/MC/MCAsmInfo.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/MC/MCAsmInfoDarwin.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp | 1 |
5 files changed, 5 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp index f2f444a13d0..28e0d97ae71 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp @@ -195,13 +195,12 @@ void DwarfPrinter::EmitReference(const MCSymbol *Sym, bool IsPCRelative, if (IsPCRelative) O << "-" << MAI->getPCSymbol(); } -/// EmitDifference - Emit the difference between two labels. Some assemblers do -/// not behave with absolute expressions with data directives, so there is an -/// option (needsSet) to use an intermediary set expression. +/// EmitDifference - Emit the difference between two labels. If this assembler +/// supports .set, we emit a .set of a temporary and then use it in the .word. void DwarfPrinter::EmitDifference(const char *TagHi, unsigned NumberHi, const char *TagLo, unsigned NumberLo, bool IsSmall) { - if (MAI->needsSet()) { + if (MAI->getSetDirective() != 0) { O << "\t.set\t"; PrintLabelName("set", SetCounter, Flavor); O << ","; @@ -232,7 +231,7 @@ void DwarfPrinter::EmitSectionOffset(const char* Label, const char* Section, else printAbsolute = MAI->isAbsoluteDebugSectionOffsets(); - if (MAI->needsSet() && useSet) { + if (MAI->getSetDirective() != 0 && useSet) { O << "\t.set\t"; PrintLabelName("set", SetCounter, Flavor); O << ","; diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.h b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.h index 86fe2abc88e..31aa69ab094 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.h @@ -138,9 +138,7 @@ public: void EmitReference(const MCSymbol *Sym, bool IsPCRelative = false, bool Force32Bit = false) const; - /// EmitDifference - Emit the difference between two labels. Some - /// assemblers do not behave with absolute expressions with data directives, - /// so there is an option (needsSet) to use an intermediary set expression. + /// EmitDifference - Emit the difference between two labels. void EmitDifference(const DWLabel &LabelHi, const DWLabel &LabelLo, bool IsSmall = false) { EmitDifference(LabelHi.getTag(), LabelHi.getNumber(), diff --git a/llvm/lib/MC/MCAsmInfo.cpp b/llvm/lib/MC/MCAsmInfo.cpp index 796dcc4d330..4a86e1df89a 100644 --- a/llvm/lib/MC/MCAsmInfo.cpp +++ b/llvm/lib/MC/MCAsmInfo.cpp @@ -22,7 +22,6 @@ MCAsmInfo::MCAsmInfo() { HasSubsectionsViaSymbols = false; HasMachoZeroFillDirective = false; HasStaticCtorDtorReferenceInStaticMode = false; - NeedsSet = false; MaxInstLength = 4; PCSymbol = "$"; SeparatorChar = ';'; diff --git a/llvm/lib/MC/MCAsmInfoDarwin.cpp b/llvm/lib/MC/MCAsmInfoDarwin.cpp index 9902f501e47..2cf982f3938 100644 --- a/llvm/lib/MC/MCAsmInfoDarwin.cpp +++ b/llvm/lib/MC/MCAsmInfoDarwin.cpp @@ -21,7 +21,6 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() { GlobalPrefix = "_"; PrivateGlobalPrefix = "L"; LinkerPrivateGlobalPrefix = "l"; - NeedsSet = true; AllowQuotesInName = true; HasSingleParameterDotFile = false; HasSubsectionsViaSymbols = true; diff --git a/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp b/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp index 03cdb2931db..c10b460e733 100644 --- a/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp +++ b/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp @@ -31,7 +31,6 @@ SPULinuxMCAsmInfo::SPULinuxMCAsmInfo(const Target &T, const StringRef &TT) { HasDotLocAndDotFile = true; SupportsDebugInformation = true; - NeedsSet = true; // Exception handling is not supported on CellSPU (think about it: you only // have 256K for code+data. Would you support exception handling?) |