diff options
Diffstat (limited to 'llvm/lib/MC/MCAsmStreamer.cpp')
| -rw-r--r-- | llvm/lib/MC/MCAsmStreamer.cpp | 204 |
1 files changed, 113 insertions, 91 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index 61ec941f50b8..6f8934d66ef4 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "llvm/ADT/Optional.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/Twine.h" @@ -31,13 +30,13 @@ #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSymbolXCOFF.h" #include "llvm/MC/TargetRegistry.h" +#include "llvm/Support/Casting.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Format.h" #include "llvm/Support/FormattedStream.h" #include "llvm/Support/LEB128.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/Path.h" -#include <cctype> using namespace llvm; @@ -127,7 +126,7 @@ public: /// Return a raw_ostream that comments can be written to. /// Unlike AddComment, you are required to terminate comments with \n if you /// use this method. - raw_ostream &GetCommentOS() override { + raw_ostream &getCommentOS() override { if (!IsVerboseAsm) return nulls(); // Discard comments unless in verbose asm mode. return CommentStream; @@ -139,9 +138,7 @@ public: void emitExplicitComments() override; /// Emit a blank line to a .s file to pretty it up. - void AddBlankLine() override { - EmitEOL(); - } + void addBlankLine() override { EmitEOL(); } /// @name MCStreamer Interface /// @{ @@ -180,15 +177,15 @@ public: bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override; void emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override; - void BeginCOFFSymbolDef(const MCSymbol *Symbol) override; - void EmitCOFFSymbolStorageClass(int StorageClass) override; - void EmitCOFFSymbolType(int Type) override; - void EndCOFFSymbolDef() override; - void EmitCOFFSafeSEH(MCSymbol const *Symbol) override; - void EmitCOFFSymbolIndex(MCSymbol const *Symbol) override; - void EmitCOFFSectionIndex(MCSymbol const *Symbol) override; - void EmitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset) override; - void EmitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset) override; + void beginCOFFSymbolDef(const MCSymbol *Symbol) override; + void emitCOFFSymbolStorageClass(int StorageClass) override; + void emitCOFFSymbolType(int Type) override; + void endCOFFSymbolDef() override; + void emitCOFFSafeSEH(MCSymbol const *Symbol) override; + void emitCOFFSymbolIndex(MCSymbol const *Symbol) override; + void emitCOFFSectionIndex(MCSymbol const *Symbol) override; + void emitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset) override; + void emitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset) override; void emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size, MCSymbol *CsectSym, unsigned ByteAlign) override; @@ -198,6 +195,8 @@ public: void emitXCOFFRenameDirective(const MCSymbol *Name, StringRef Rename) override; + void emitXCOFFRefDirective(StringRef Name) override; + void emitELFSize(MCSymbol *Symbol, const MCExpr *Value) override; void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override; @@ -276,11 +275,11 @@ public: StringRef FileName) override; MCSymbol *getDwarfLineTableSymbol(unsigned CUID) override; - bool EmitCVFileDirective(unsigned FileNo, StringRef Filename, + bool emitCVFileDirective(unsigned FileNo, StringRef Filename, ArrayRef<uint8_t> Checksum, unsigned ChecksumKind) override; - bool EmitCVFuncIdDirective(unsigned FuncId) override; - bool EmitCVInlineSiteIdDirective(unsigned FunctionId, unsigned IAFunc, + bool emitCVFuncIdDirective(unsigned FuncId) override; + bool emitCVInlineSiteIdDirective(unsigned FunctionId, unsigned IAFunc, unsigned IAFile, unsigned IALine, unsigned IACol, SMLoc Loc) override; void emitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line, @@ -316,10 +315,11 @@ public: void emitCVStringTableDirective() override; void emitCVFileChecksumsDirective() override; void emitCVFileChecksumOffsetDirective(unsigned FileNo) override; - void EmitCVFPOData(const MCSymbol *ProcSym, SMLoc L) override; + void emitCVFPOData(const MCSymbol *ProcSym, SMLoc L) override; void emitIdent(StringRef IdentString) override; void emitCFIBKeyFrame() override; + void emitCFIMTETaggedFrame() override; void emitCFISections(bool EH, bool Debug) override; void emitCFIDefCfa(int64_t Register, int64_t Offset) override; void emitCFIDefCfaOffset(int64_t Offset) override; @@ -344,25 +344,25 @@ public: void emitCFINegateRAState() override; void emitCFIReturnColumn(int64_t Register) override; - void EmitWinCFIStartProc(const MCSymbol *Symbol, SMLoc Loc) override; - void EmitWinCFIEndProc(SMLoc Loc) override; - void EmitWinCFIFuncletOrFuncEnd(SMLoc Loc) override; - void EmitWinCFIStartChained(SMLoc Loc) override; - void EmitWinCFIEndChained(SMLoc Loc) override; - void EmitWinCFIPushReg(MCRegister Register, SMLoc Loc) override; - void EmitWinCFISetFrame(MCRegister Register, unsigned Offset, + void emitWinCFIStartProc(const MCSymbol *Symbol, SMLoc Loc) override; + void emitWinCFIEndProc(SMLoc Loc) override; + void emitWinCFIFuncletOrFuncEnd(SMLoc Loc) override; + void emitWinCFIStartChained(SMLoc Loc) override; + void emitWinCFIEndChained(SMLoc Loc) override; + void emitWinCFIPushReg(MCRegister Register, SMLoc Loc) override; + void emitWinCFISetFrame(MCRegister Register, unsigned Offset, SMLoc Loc) override; - void EmitWinCFIAllocStack(unsigned Size, SMLoc Loc) override; - void EmitWinCFISaveReg(MCRegister Register, unsigned Offset, + void emitWinCFIAllocStack(unsigned Size, SMLoc Loc) override; + void emitWinCFISaveReg(MCRegister Register, unsigned Offset, SMLoc Loc) override; - void EmitWinCFISaveXMM(MCRegister Register, unsigned Offset, + void emitWinCFISaveXMM(MCRegister Register, unsigned Offset, SMLoc Loc) override; - void EmitWinCFIPushFrame(bool Code, SMLoc Loc) override; - void EmitWinCFIEndProlog(SMLoc Loc) override; + void emitWinCFIPushFrame(bool Code, SMLoc Loc) override; + void emitWinCFIEndProlog(SMLoc Loc) override; - void EmitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except, + void emitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except, SMLoc Loc) override; - void EmitWinEHHandlerData(SMLoc Loc) override; + void emitWinEHHandlerData(SMLoc Loc) override; void emitCGProfileEntry(const MCSymbolRefExpr *From, const MCSymbolRefExpr *To, uint64_t Count) override; @@ -502,7 +502,7 @@ void MCAsmStreamer::changeSection(MCSection *Section, if (MCTargetStreamer *TS = getTargetStreamer()) { TS->changeSection(getCurrentSectionOnly(), Section, Subsection, OS); } else { - Section->PrintSwitchToSection(*MAI, getContext().getTargetTriple(), OS, + Section->printSwitchToSection(*MAI, getContext().getTargetTriple(), OS, Subsection); } } @@ -761,6 +761,8 @@ bool MCAsmStreamer::emitSymbolAttribute(MCSymbol *Symbol, case MCSA_WeakDefAutoPrivate: OS << "\t.weak_def_can_be_hidden\t"; break; case MCSA_Cold: // Assemblers currently do not support a .cold directive. + case MCSA_Exported: + // Non-AIX assemblers currently do not support exported visibility. return false; } @@ -787,47 +789,47 @@ void MCAsmStreamer::emitSyntaxDirective() { // with may have a value of prefix or noprefix. } -void MCAsmStreamer::BeginCOFFSymbolDef(const MCSymbol *Symbol) { +void MCAsmStreamer::beginCOFFSymbolDef(const MCSymbol *Symbol) { OS << "\t.def\t"; Symbol->print(OS, MAI); OS << ';'; EmitEOL(); } -void MCAsmStreamer::EmitCOFFSymbolStorageClass (int StorageClass) { +void MCAsmStreamer::emitCOFFSymbolStorageClass(int StorageClass) { OS << "\t.scl\t" << StorageClass << ';'; EmitEOL(); } -void MCAsmStreamer::EmitCOFFSymbolType (int Type) { +void MCAsmStreamer::emitCOFFSymbolType(int Type) { OS << "\t.type\t" << Type << ';'; EmitEOL(); } -void MCAsmStreamer::EndCOFFSymbolDef() { +void MCAsmStreamer::endCOFFSymbolDef() { OS << "\t.endef"; EmitEOL(); } -void MCAsmStreamer::EmitCOFFSafeSEH(MCSymbol const *Symbol) { +void MCAsmStreamer::emitCOFFSafeSEH(MCSymbol const *Symbol) { OS << "\t.safeseh\t"; Symbol->print(OS, MAI); EmitEOL(); } -void MCAsmStreamer::EmitCOFFSymbolIndex(MCSymbol const *Symbol) { +void MCAsmStreamer::emitCOFFSymbolIndex(MCSymbol const *Symbol) { OS << "\t.symidx\t"; Symbol->print(OS, MAI); EmitEOL(); } -void MCAsmStreamer::EmitCOFFSectionIndex(MCSymbol const *Symbol) { +void MCAsmStreamer::emitCOFFSectionIndex(MCSymbol const *Symbol) { OS << "\t.secidx\t"; Symbol->print(OS, MAI); EmitEOL(); } -void MCAsmStreamer::EmitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset) { +void MCAsmStreamer::emitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset) { OS << "\t.secrel32\t"; Symbol->print(OS, MAI); if (Offset != 0) @@ -835,7 +837,7 @@ void MCAsmStreamer::EmitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset) { EmitEOL(); } -void MCAsmStreamer::EmitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset) { +void MCAsmStreamer::emitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset) { OS << "\t.rva\t"; Symbol->print(OS, MAI); if (Offset > 0) @@ -903,6 +905,9 @@ void MCAsmStreamer::emitXCOFFSymbolLinkageWithVisibility( case MCSA_Protected: OS << ",protected"; break; + case MCSA_Exported: + OS << ",exported"; + break; default: report_fatal_error("unexpected value for Visibility type"); } @@ -931,6 +936,11 @@ void MCAsmStreamer::emitXCOFFRenameDirective(const MCSymbol *Name, EmitEOL(); } +void MCAsmStreamer::emitXCOFFRefDirective(StringRef Name) { + OS << "\t.ref " << Name; + EmitEOL(); +} + void MCAsmStreamer::emitELFSize(MCSymbol *Symbol, const MCExpr *Value) { assert(MAI->hasDotTypeDotSizeDirective()); OS << "\t.size\t"; @@ -988,7 +998,7 @@ void MCAsmStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment, SMLoc Loc) { if (Symbol) - AssignFragment(Symbol, &Section->getDummyFragment()); + assignFragment(Symbol, &Section->getDummyFragment()); // Note: a .zerofill directive does not switch sections. OS << ".zerofill "; @@ -1015,7 +1025,7 @@ void MCAsmStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol, // e.g. _a. void MCAsmStreamer::emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) { - AssignFragment(Symbol, &Section->getDummyFragment()); + assignFragment(Symbol, &Section->getDummyFragment()); assert(Symbol && "Symbol shouldn't be NULL!"); // Instead of using the Section we'll just use the shortcut. @@ -1643,7 +1653,7 @@ MCSymbol *MCAsmStreamer::getDwarfLineTableSymbol(unsigned CUID) { return MCStreamer::getDwarfLineTableSymbol(0); } -bool MCAsmStreamer::EmitCVFileDirective(unsigned FileNo, StringRef Filename, +bool MCAsmStreamer::emitCVFileDirective(unsigned FileNo, StringRef Filename, ArrayRef<uint8_t> Checksum, unsigned ChecksumKind) { if (!getContext().getCVContext().addFile(*this, FileNo, Filename, Checksum, @@ -1666,19 +1676,19 @@ bool MCAsmStreamer::EmitCVFileDirective(unsigned FileNo, StringRef Filename, return true; } -bool MCAsmStreamer::EmitCVFuncIdDirective(unsigned FuncId) { +bool MCAsmStreamer::emitCVFuncIdDirective(unsigned FuncId) { OS << "\t.cv_func_id " << FuncId << '\n'; - return MCStreamer::EmitCVFuncIdDirective(FuncId); + return MCStreamer::emitCVFuncIdDirective(FuncId); } -bool MCAsmStreamer::EmitCVInlineSiteIdDirective(unsigned FunctionId, +bool MCAsmStreamer::emitCVInlineSiteIdDirective(unsigned FunctionId, unsigned IAFunc, unsigned IAFile, unsigned IALine, unsigned IACol, SMLoc Loc) { OS << "\t.cv_inline_site_id " << FunctionId << " within " << IAFunc << " inlined_at " << IAFile << ' ' << IALine << ' ' << IACol << '\n'; - return MCStreamer::EmitCVInlineSiteIdDirective(FunctionId, IAFunc, IAFile, + return MCStreamer::emitCVInlineSiteIdDirective(FunctionId, IAFunc, IAFile, IALine, IACol, Loc); } @@ -1795,7 +1805,7 @@ void MCAsmStreamer::emitCVFileChecksumOffsetDirective(unsigned FileNo) { EmitEOL(); } -void MCAsmStreamer::EmitCVFPOData(const MCSymbol *ProcSym, SMLoc L) { +void MCAsmStreamer::emitCVFPOData(const MCSymbol *ProcSym, SMLoc L) { OS << "\t.cv_fpo_data\t"; ProcSym->print(OS, MAI); EmitEOL(); @@ -2016,59 +2026,69 @@ void MCAsmStreamer::emitCFIBKeyFrame() { EmitEOL(); } -void MCAsmStreamer::EmitWinCFIStartProc(const MCSymbol *Symbol, SMLoc Loc) { - MCStreamer::EmitWinCFIStartProc(Symbol, Loc); +void MCAsmStreamer::emitCFIMTETaggedFrame() { + MCStreamer::emitCFIMTETaggedFrame(); + OS << "\t.cfi_mte_tagged_frame"; + EmitEOL(); +} + +void MCAsmStreamer::emitWinCFIStartProc(const MCSymbol *Symbol, SMLoc Loc) { + MCStreamer::emitWinCFIStartProc(Symbol, Loc); OS << ".seh_proc "; Symbol->print(OS, MAI); EmitEOL(); } -void MCAsmStreamer::EmitWinCFIEndProc(SMLoc Loc) { - MCStreamer::EmitWinCFIEndProc(Loc); +void MCAsmStreamer::emitWinCFIEndProc(SMLoc Loc) { + MCStreamer::emitWinCFIEndProc(Loc); OS << "\t.seh_endproc"; EmitEOL(); } -void MCAsmStreamer::EmitWinCFIFuncletOrFuncEnd(SMLoc Loc) { - MCStreamer::EmitWinCFIFuncletOrFuncEnd(Loc); +void MCAsmStreamer::emitWinCFIFuncletOrFuncEnd(SMLoc Loc) { + MCStreamer::emitWinCFIFuncletOrFuncEnd(Loc); OS << "\t.seh_endfunclet"; EmitEOL(); } -void MCAsmStreamer::EmitWinCFIStartChained(SMLoc Loc) { - MCStreamer::EmitWinCFIStartChained(Loc); +void MCAsmStreamer::emitWinCFIStartChained(SMLoc Loc) { + MCStreamer::emitWinCFIStartChained(Loc); OS << "\t.seh_startchained"; EmitEOL(); } -void MCAsmStreamer::EmitWinCFIEndChained(SMLoc Loc) { - MCStreamer::EmitWinCFIEndChained(Loc); +void MCAsmStreamer::emitWinCFIEndChained(SMLoc Loc) { + MCStreamer::emitWinCFIEndChained(Loc); OS << "\t.seh_endchained"; EmitEOL(); } -void MCAsmStreamer::EmitWinEHHandler(const MCSymbol *Sym, bool Unwind, +void MCAsmStreamer::emitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except, SMLoc Loc) { - MCStreamer::EmitWinEHHandler(Sym, Unwind, Except, Loc); + MCStreamer::emitWinEHHandler(Sym, Unwind, Except, Loc); OS << "\t.seh_handler "; Sym->print(OS, MAI); + char Marker = '@'; + const Triple &T = getContext().getTargetTriple(); + if (T.getArch() == Triple::arm || T.getArch() == Triple::thumb) + Marker = '%'; if (Unwind) - OS << ", @unwind"; + OS << ", " << Marker << "unwind"; if (Except) - OS << ", @except"; + OS << ", " << Marker << "except"; EmitEOL(); } -void MCAsmStreamer::EmitWinEHHandlerData(SMLoc Loc) { - MCStreamer::EmitWinEHHandlerData(Loc); +void MCAsmStreamer::emitWinEHHandlerData(SMLoc Loc) { + MCStreamer::emitWinEHHandlerData(Loc); - // Switch sections. Don't call SwitchSection directly, because that will + // Switch sections. Don't call switchSection directly, because that will // cause the section switch to be visible in the emitted assembly. // We only do this so the section switch that terminates the handler // data block is visible. @@ -2081,23 +2101,23 @@ void MCAsmStreamer::EmitWinEHHandlerData(SMLoc Loc) { MCSection *TextSec = &CurFrame->Function->getSection(); MCSection *XData = getAssociatedXDataSection(TextSec); - SwitchSectionNoChange(XData); + switchSectionNoChange(XData); OS << "\t.seh_handlerdata"; EmitEOL(); } -void MCAsmStreamer::EmitWinCFIPushReg(MCRegister Register, SMLoc Loc) { - MCStreamer::EmitWinCFIPushReg(Register, Loc); +void MCAsmStreamer::emitWinCFIPushReg(MCRegister Register, SMLoc Loc) { + MCStreamer::emitWinCFIPushReg(Register, Loc); OS << "\t.seh_pushreg "; InstPrinter->printRegName(OS, Register); EmitEOL(); } -void MCAsmStreamer::EmitWinCFISetFrame(MCRegister Register, unsigned Offset, +void MCAsmStreamer::emitWinCFISetFrame(MCRegister Register, unsigned Offset, SMLoc Loc) { - MCStreamer::EmitWinCFISetFrame(Register, Offset, Loc); + MCStreamer::emitWinCFISetFrame(Register, Offset, Loc); OS << "\t.seh_setframe "; InstPrinter->printRegName(OS, Register); @@ -2105,16 +2125,16 @@ void MCAsmStreamer::EmitWinCFISetFrame(MCRegister Register, unsigned Offset, EmitEOL(); } -void MCAsmStreamer::EmitWinCFIAllocStack(unsigned Size, SMLoc Loc) { - MCStreamer::EmitWinCFIAllocStack(Size, Loc); +void MCAsmStreamer::emitWinCFIAllocStack(unsigned Size, SMLoc Loc) { + MCStreamer::emitWinCFIAllocStack(Size, Loc); OS << "\t.seh_stackalloc " << Size; EmitEOL(); } -void MCAsmStreamer::EmitWinCFISaveReg(MCRegister Register, unsigned Offset, +void MCAsmStreamer::emitWinCFISaveReg(MCRegister Register, unsigned Offset, SMLoc Loc) { - MCStreamer::EmitWinCFISaveReg(Register, Offset, Loc); + MCStreamer::emitWinCFISaveReg(Register, Offset, Loc); OS << "\t.seh_savereg "; InstPrinter->printRegName(OS, Register); @@ -2122,9 +2142,9 @@ void MCAsmStreamer::EmitWinCFISaveReg(MCRegister Register, unsigned Offset, EmitEOL(); } -void MCAsmStreamer::EmitWinCFISaveXMM(MCRegister Register, unsigned Offset, +void MCAsmStreamer::emitWinCFISaveXMM(MCRegister Register, unsigned Offset, SMLoc Loc) { - MCStreamer::EmitWinCFISaveXMM(Register, Offset, Loc); + MCStreamer::emitWinCFISaveXMM(Register, Offset, Loc); OS << "\t.seh_savexmm "; InstPrinter->printRegName(OS, Register); @@ -2132,8 +2152,8 @@ void MCAsmStreamer::EmitWinCFISaveXMM(MCRegister Register, unsigned Offset, EmitEOL(); } -void MCAsmStreamer::EmitWinCFIPushFrame(bool Code, SMLoc Loc) { - MCStreamer::EmitWinCFIPushFrame(Code, Loc); +void MCAsmStreamer::emitWinCFIPushFrame(bool Code, SMLoc Loc) { + MCStreamer::emitWinCFIPushFrame(Code, Loc); OS << "\t.seh_pushframe"; if (Code) @@ -2141,8 +2161,8 @@ void MCAsmStreamer::EmitWinCFIPushFrame(bool Code, SMLoc Loc) { EmitEOL(); } -void MCAsmStreamer::EmitWinCFIEndProlog(SMLoc Loc) { - MCStreamer::EmitWinCFIEndProlog(Loc); +void MCAsmStreamer::emitWinCFIEndProlog(SMLoc Loc) { + MCStreamer::emitWinCFIEndProlog(Loc); OS << "\t.seh_endprologue"; EmitEOL(); @@ -2161,7 +2181,7 @@ void MCAsmStreamer::emitCGProfileEntry(const MCSymbolRefExpr *From, void MCAsmStreamer::AddEncodingComment(const MCInst &Inst, const MCSubtargetInfo &STI) { - raw_ostream &OS = GetCommentOS(); + raw_ostream &OS = getCommentOS(); SmallString<256> Code; SmallVector<MCFixup, 4> Fixups; raw_svector_ostream VecOS(Code); @@ -2245,8 +2265,10 @@ void MCAsmStreamer::AddEncodingComment(const MCInst &Inst, MCFixup &F = Fixups[i]; const MCFixupKindInfo &Info = getAssembler().getBackend().getFixupKindInfo(F.getKind()); - OS << " fixup " << char('A' + i) << " - " << "offset: " << F.getOffset() - << ", value: " << *F.getValue() << ", kind: " << Info.Name << "\n"; + OS << " fixup " << char('A' + i) << " - " + << "offset: " << F.getOffset() << ", value: "; + F.getValue()->print(OS, MAI); + OS << ", kind: " << Info.Name << "\n"; } } @@ -2265,8 +2287,8 @@ void MCAsmStreamer::emitInstruction(const MCInst &Inst, // Show the MCInst if enabled. if (ShowInst) { - Inst.dump_pretty(GetCommentOS(), InstPrinter.get(), "\n "); - GetCommentOS() << "\n"; + Inst.dump_pretty(getCommentOS(), InstPrinter.get(), "\n "); + getCommentOS() << "\n"; } if(getTargetStreamer()) @@ -2276,7 +2298,7 @@ void MCAsmStreamer::emitInstruction(const MCInst &Inst, StringRef Comments = CommentToEmit; if (Comments.size() && Comments.back() != '\n') - GetCommentOS() << "\n"; + getCommentOS() << "\n"; EmitEOL(); } @@ -2365,7 +2387,7 @@ void MCAsmStreamer::finishImpl() { if (!Tables.empty()) { assert(Tables.size() == 1 && "asm output only supports one line table"); if (auto *Label = Tables.begin()->second.getLabel()) { - SwitchSection(getContext().getObjectFileInfo()->getDwarfLineSection()); + switchSection(getContext().getObjectFileInfo()->getDwarfLineSection()); emitLabel(Label); } } @@ -2492,7 +2514,7 @@ void MCAsmStreamer::doFinalizationAtSectionEnd(MCSection *Section) { if (MAI->usesDwarfFileAndLocDirectives()) return; - SwitchSectionNoChange(Section); + switchSectionNoChange(Section); MCSymbol *Sym = getCurrentSectionOnly()->getEndSymbol(getContext()); |
