diff options
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCAsmInfo.cpp | 2 | ||||
-rw-r--r-- | lib/MC/MCAsmStreamer.cpp | 18 | ||||
-rw-r--r-- | lib/MC/MCSection.cpp | 2 | ||||
-rw-r--r-- | lib/MC/MCSectionELF.cpp | 14 | ||||
-rw-r--r-- | lib/MC/MCSectionMachO.cpp | 2 |
5 files changed, 19 insertions, 19 deletions
diff --git a/lib/MC/MCAsmInfo.cpp b/lib/MC/MCAsmInfo.cpp index c38bf70..0653b19 100644 --- a/lib/MC/MCAsmInfo.cpp +++ b/lib/MC/MCAsmInfo.cpp @@ -66,7 +66,7 @@ MCAsmInfo::MCAsmInfo() { UsedDirective = 0; WeakRefDirective = 0; WeakDefDirective = 0; - // FIXME: These are ELFish - move to ELFTAI. + // FIXME: These are ELFish - move to ELFMAI. HiddenDirective = "\t.hidden\t"; ProtectedDirective = "\t.protected\t"; AbsoluteDebugSectionOffsets = false; diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index 32460c2..76d6ee6 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -24,12 +24,12 @@ namespace { class MCAsmStreamer : public MCStreamer { raw_ostream &OS; - const MCAsmInfo &TAI; + const MCAsmInfo &MAI; AsmPrinter *Printer; public: MCAsmStreamer(MCContext &Context, raw_ostream &_OS, const MCAsmInfo &tai, AsmPrinter *_AsmPrinter) - : MCStreamer(Context), OS(_OS), TAI(tai), Printer(_AsmPrinter) {} + : MCStreamer(Context), OS(_OS), MAI(tai), Printer(_AsmPrinter) {} ~MCAsmStreamer() {} /// @name MCStreamer Interface @@ -102,7 +102,7 @@ void MCAsmStreamer::SwitchSection(const MCSection *Section) { assert(Section && "Cannot switch to a null section!"); if (Section != CurSection) { CurSection = Section; - Section->PrintSwitchToSection(TAI, OS); + Section->PrintSwitchToSection(MAI, OS); } } @@ -230,14 +230,14 @@ void MCAsmStreamer::EmitValueToAlignment(unsigned ByteAlignment, int64_t Value, if (isPowerOf2_32(ByteAlignment)) { switch (ValueSize) { default: llvm_unreachable("Invalid size for machine code value!"); - case 1: OS << TAI.getAlignDirective(); break; - // FIXME: use TAI for this! + case 1: OS << MAI.getAlignDirective(); break; + // FIXME: use MAI for this! case 2: OS << ".p2alignw "; break; case 4: OS << ".p2alignl "; break; case 8: llvm_unreachable("Unsupported alignment size!"); } - if (TAI.getAlignmentIsInBytes()) + if (MAI.getAlignmentIsInBytes()) OS << ByteAlignment; else OS << Log2_32(ByteAlignment); @@ -253,7 +253,7 @@ void MCAsmStreamer::EmitValueToAlignment(unsigned ByteAlignment, int64_t Value, } // Non-power of two alignment. This is not widely supported by assemblers. - // FIXME: Parameterize this based on TAI. + // FIXME: Parameterize this based on MAI. switch (ValueSize) { default: llvm_unreachable("Invalid size for machine code value!"); case 1: OS << ".balign"; break; @@ -314,6 +314,6 @@ void MCAsmStreamer::Finish() { } MCStreamer *llvm::createAsmStreamer(MCContext &Context, raw_ostream &OS, - const MCAsmInfo &TAI, AsmPrinter *AP) { - return new MCAsmStreamer(Context, OS, TAI, AP); + const MCAsmInfo &MAI, AsmPrinter *AP) { + return new MCAsmStreamer(Context, OS, MAI, AP); } diff --git a/lib/MC/MCSection.cpp b/lib/MC/MCSection.cpp index 1f2896b..333a471 100644 --- a/lib/MC/MCSection.cpp +++ b/lib/MC/MCSection.cpp @@ -29,7 +29,7 @@ Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx) { return new (Ctx) MCSectionCOFF(Name, IsDirective, K); } -void MCSectionCOFF::PrintSwitchToSection(const MCAsmInfo &TAI, +void MCSectionCOFF::PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS) const { if (isDirective()) { diff --git a/lib/MC/MCSectionELF.cpp b/lib/MC/MCSectionELF.cpp index 96f8429..660a8c9 100644 --- a/lib/MC/MCSectionELF.cpp +++ b/lib/MC/MCSectionELF.cpp @@ -23,13 +23,13 @@ Create(const StringRef &Section, unsigned Type, unsigned Flags, // ShouldOmitSectionDirective - Decides whether a '.section' directive // should be printed before the section name bool MCSectionELF::ShouldOmitSectionDirective(const char *Name, - const MCAsmInfo &TAI) const { + const MCAsmInfo &MAI) const { // FIXME: Does .section .bss/.data/.text work everywhere?? if (strcmp(Name, ".text") == 0 || strcmp(Name, ".data") == 0 || (strcmp(Name, ".bss") == 0 && - !TAI.usesELFSectionDirectiveForBSS())) + !MAI.usesELFSectionDirectiveForBSS())) return true; return false; @@ -44,10 +44,10 @@ bool MCSectionELF::ShouldPrintSectionType(unsigned Ty) const { return true; } -void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &TAI, +void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS) const { - if (ShouldOmitSectionDirective(SectionName.c_str(), TAI)) { + if (ShouldOmitSectionDirective(SectionName.c_str(), MAI)) { OS << '\t' << getSectionName() << '\n'; return; } @@ -55,7 +55,7 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &TAI, OS << "\t.section\t" << getSectionName(); // Handle the weird solaris syntax if desired. - if (TAI.usesSunStyleELFSectionSwitchSyntax() && + if (MAI.usesSunStyleELFSectionSwitchSyntax() && !(Flags & MCSectionELF::SHF_MERGE)) { if (Flags & MCSectionELF::SHF_ALLOC) OS << ",#alloc"; @@ -82,7 +82,7 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &TAI, // If there are target-specific flags, print them. if (Flags & ~MCSectionELF::TARGET_INDEP_SHF) - PrintTargetSpecificSectionFlags(TAI, OS); + PrintTargetSpecificSectionFlags(MAI, OS); OS << '"'; @@ -90,7 +90,7 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &TAI, OS << ','; // If comment string is '@', e.g. as on ARM - use '%' instead - if (TAI.getCommentString()[0] == '@') + if (MAI.getCommentString()[0] == '@') OS << '%'; else OS << '@'; diff --git a/lib/MC/MCSectionMachO.cpp b/lib/MC/MCSectionMachO.cpp index 5615398..32d908f 100644 --- a/lib/MC/MCSectionMachO.cpp +++ b/lib/MC/MCSectionMachO.cpp @@ -72,7 +72,7 @@ Create(const StringRef &Segment, const StringRef &Section, Reserved2, K); } -void MCSectionMachO::PrintSwitchToSection(const MCAsmInfo &TAI, +void MCSectionMachO::PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS) const { OS << "\t.section\t" << getSegmentName() << ',' << getSectionName(); |