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 | 5e969572f5b9e519eb01837cd84f129e46b6b892 (patch) | |
| tree | 940f80c27df82f5e4ccba4a33aa3b72d90f357fa /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
| parent | 0fcb1f17109cf77ff02c2379924cd59130a79711 (diff) | |
| download | external_llvm-5e969572f5b9e519eb01837cd84f129e46b6b892.zip external_llvm-5e969572f5b9e519eb01837cd84f129e46b6b892.tar.gz external_llvm-5e969572f5b9e519eb01837cd84f129e46b6b892.tar.bz2 | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94585 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
| -rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 42bf352..d2c1721 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/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); |
