diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-01-26 20:40:54 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-01-26 20:40:54 +0000 |
| commit | ff234e09b9058b04bb1e699e3d4a82d2c8263439 (patch) | |
| tree | ac3b9097ab0ad2ca483f4e14524d42383faefa77 /llvm/lib/CodeGen | |
| parent | f0ed69cb5b5e436d61f24683ce658e861592a366 (diff) | |
| download | bcm5719-llvm-ff234e09b9058b04bb1e699e3d4a82d2c8263439.tar.gz bcm5719-llvm-ff234e09b9058b04bb1e699e3d4a82d2c8263439.zip | |
Eliminate SetDirective, and replace it with HasSetDirective.
Default HasSetDirective to true, since most targets have it.
The targets that claim to not have it probably do, or it is
spelled differently. These include Blackfin, Mips, Alpha, and
PIC16. All of these except pic16 are normal ELF targets, so
they almost certainly have it.
llvm-svn: 94585
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 10 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 42bf35213e3..d2c1721012a 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -318,7 +318,7 @@ bool AsmPrinter::doFinalization(Module &M) { } } - if (MAI->getSetDirective()) { + if (MAI->hasSetDirective()) { OutStreamer.AddBlankLine(); for (Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); I != E; ++I) { @@ -336,7 +336,7 @@ bool AsmPrinter::doFinalization(Module &M) { printVisibility(Name, I->getVisibility()); - O << MAI->getSetDirective() << ' ' << *Name << ", " << *Target << '\n'; + O << "\t.set\t" << *Name << ", " << *Target << '\n'; } } @@ -516,7 +516,7 @@ void AsmPrinter::EmitJumpTableInfo(MachineFunction &MF) { // .set directive for each unique entry. This reduces the number of // relocations the assembler will generate for the jump table. if (MJTI->getEntryKind() == MachineJumpTableInfo::EK_LabelDifference32 && - MAI->getSetDirective()) { + MAI->hasSetDirective()) { SmallPtrSet<const MachineBasicBlock*, 16> EmittedSets; const TargetLowering *TLI = TM.getTargetLowering(); const MCExpr *Base = TLI->getPICJumpTableRelocBaseExpr(&MF, JTI, @@ -525,7 +525,7 @@ void AsmPrinter::EmitJumpTableInfo(MachineFunction &MF) { const MachineBasicBlock *MBB = JTBBs[ii]; if (!EmittedSets.insert(MBB)) continue; - O << MAI->getSetDirective() << ' ' + O << "\t.set\t" << *GetJTSetSymbol(JTI, MBB->getNumber()) << ',' << *MBB->getSymbol(OutContext) << '-' << *Base << '\n'; } @@ -584,7 +584,7 @@ void AsmPrinter::EmitJumpTableEntry(const MachineJumpTableInfo *MJTI, // If we have emitted set directives for the jump table entries, print // them rather than the entries themselves. If we're emitting PIC, then // emit the table entries as differences between two text section labels. - if (MAI->getSetDirective()) { + if (MAI->hasSetDirective()) { // If we used .set, reference the .set's symbol. Value = MCSymbolRefExpr::Create(GetJTSetSymbol(UID, MBB->getNumber()), OutContext); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp index 28e0d97ae71..f659c51908b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp @@ -200,7 +200,7 @@ void DwarfPrinter::EmitReference(const MCSymbol *Sym, bool IsPCRelative, void DwarfPrinter::EmitDifference(const char *TagHi, unsigned NumberHi, const char *TagLo, unsigned NumberLo, bool IsSmall) { - if (MAI->getSetDirective() != 0) { + if (MAI->hasSetDirective()) { O << "\t.set\t"; PrintLabelName("set", SetCounter, Flavor); O << ","; @@ -231,7 +231,7 @@ void DwarfPrinter::EmitSectionOffset(const char* Label, const char* Section, else printAbsolute = MAI->isAbsoluteDebugSectionOffsets(); - if (MAI->getSetDirective() != 0 && useSet) { + if (MAI->hasSetDirective() && useSet) { O << "\t.set\t"; PrintLabelName("set", SetCounter, Flavor); O << ","; |

