From 15d82c62dcd7ba1bff6b62c2efaeeeac1187760f Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 7 Jun 2022 00:31:02 -0700 Subject: [PATCH] [MC] De-capitalize MCStreamer functions Follow-up to c031378ce01b8485ba0ef486654bc9393c4ac024 . The class is mostly consistent now. --- bolt/lib/Rewrite/DWARFRewriter.cpp | 4 +- bolt/lib/Rewrite/MachORewriteInstance.cpp | 2 +- bolt/lib/Rewrite/RewriteInstance.cpp | 2 +- llvm/include/llvm/MC/MCStreamer.h | 32 ++++----- llvm/include/llvm/MC/MCWinCOFFStreamer.h | 4 +- llvm/lib/CodeGen/AsmPrinter/ARMException.cpp | 4 +- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 70 +++++++++---------- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 4 +- llvm/lib/CodeGen/AsmPrinter/DIE.cpp | 2 +- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 +- llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp | 4 +- .../lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp | 2 +- llvm/lib/CodeGen/AsmPrinter/WinException.cpp | 8 +-- llvm/lib/CodeGen/StackMaps.cpp | 2 +- .../CodeGen/TargetLoweringObjectFileImpl.cpp | 6 +- llvm/lib/DWARFLinker/DWARFStreamer.cpp | 2 +- llvm/lib/MC/MCAsmStreamer.cpp | 30 ++++---- llvm/lib/MC/MCELFStreamer.cpp | 8 +-- llvm/lib/MC/MCMachOStreamer.cpp | 4 +- llvm/lib/MC/MCNullStreamer.cpp | 4 +- llvm/lib/MC/MCParser/AsmParser.cpp | 10 +-- llvm/lib/MC/MCParser/COFFAsmParser.cpp | 4 +- llvm/lib/MC/MCParser/COFFMasmParser.cpp | 4 +- llvm/lib/MC/MCParser/DarwinAsmParser.cpp | 6 +- llvm/lib/MC/MCParser/ELFAsmParser.cpp | 12 ++-- llvm/lib/MC/MCParser/MasmParser.cpp | 6 +- llvm/lib/MC/MCStreamer.cpp | 10 +-- llvm/lib/MC/MCWinCOFFStreamer.cpp | 12 ++-- llvm/lib/Object/RecordStreamer.h | 4 +- llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp | 10 +-- llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp | 4 +- .../MCTargetDesc/AMDGPUTargetStreamer.cpp | 12 ++-- llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 8 +-- .../lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 2 +- .../ARM/MCTargetDesc/ARMELFStreamer.cpp | 12 ++-- .../ARM/MCTargetDesc/ARMTargetStreamer.cpp | 4 +- .../Hexagon/AsmParser/HexagonAsmParser.cpp | 6 +- .../Mips/MCTargetDesc/MipsOptionRecord.cpp | 4 +- .../Mips/MCTargetDesc/MipsTargetStreamer.cpp | 4 +- llvm/lib/Target/Mips/MipsAsmPrinter.cpp | 8 +-- llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 2 +- .../PowerPC/MCTargetDesc/PPCELFStreamer.cpp | 2 +- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 8 +-- llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp | 2 +- llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp | 8 +-- .../WebAssembly/WebAssemblyAsmPrinter.cpp | 16 ++--- llvm/lib/Target/X86/X86AsmPrinter.cpp | 10 +-- llvm/tools/llvm-dwp/llvm-dwp.cpp | 2 +- llvm/tools/llvm-mca/CodeRegionGenerator.cpp | 4 +- .../DWARF/DWARFExpressionCopyBytesTest.cpp | 2 +- .../DebugInfo/DWARF/DwarfGenerator.cpp | 2 +- llvm/unittests/MC/DwarfLineTableHeaders.cpp | 4 +- 52 files changed, 200 insertions(+), 202 deletions(-) diff --git a/bolt/lib/Rewrite/DWARFRewriter.cpp b/bolt/lib/Rewrite/DWARFRewriter.cpp index d0fc59176765..3280b5d9becb 100644 --- a/bolt/lib/Rewrite/DWARFRewriter.cpp +++ b/bolt/lib/Rewrite/DWARFRewriter.cpp @@ -1538,7 +1538,7 @@ void DWARFRewriter::writeDWP( writeIndex(*Streamer.get(), MCOFI.getDwarfCUIndexSection(), ContributionOffsets, IndexEntries, IndexVersion); - Streamer->Finish(); + Streamer->finish(); Out->keep(); } @@ -1637,7 +1637,7 @@ void DWARFRewriter::writeDWOFiles( RangeListssWriter)) Streamer->emitBytes(*OutData); } - Streamer->Finish(); + Streamer->finish(); TempOut->keep(); } } diff --git a/bolt/lib/Rewrite/MachORewriteInstance.cpp b/bolt/lib/Rewrite/MachORewriteInstance.cpp index 0f85eb1a8a3b..0958e6eb7314 100644 --- a/bolt/lib/Rewrite/MachORewriteInstance.cpp +++ b/bolt/lib/Rewrite/MachORewriteInstance.cpp @@ -494,7 +494,7 @@ void MachORewriteInstance::emitAndLink() { auto Streamer = BC->createStreamer(*OS); emitBinaryContext(*Streamer, *BC, getOrgSecPrefix()); - Streamer->Finish(); + Streamer->finish(); std::unique_ptr ObjectMemBuffer = MemoryBuffer::getMemBuffer(BOS->str(), "in-memory object file", false); diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp index 0bf6f8407412..b4e961306423 100644 --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -3116,7 +3116,7 @@ void RewriteInstance::emitAndLink() { emitBinaryContext(*Streamer, *BC, getOrgSecPrefix()); - Streamer->Finish(); + Streamer->finish(); if (Streamer->getContext().hadError()) { errs() << "BOLT-ERROR: Emission failed.\n"; exit(1); diff --git a/llvm/include/llvm/MC/MCStreamer.h b/llvm/include/llvm/MC/MCStreamer.h index e077d01ab877..47594ab61e17 100644 --- a/llvm/include/llvm/MC/MCStreamer.h +++ b/llvm/include/llvm/MC/MCStreamer.h @@ -113,7 +113,7 @@ public: /// Update streamer for a new active section. /// - /// This is called by PopSection and SwitchSection, if the current + /// This is called by popSection and SwitchSection, if the current /// section changes. virtual void changeSection(const MCSection *CurSection, MCSection *Section, const MCExpr *SubSection, raw_ostream &OS); @@ -165,7 +165,7 @@ public: virtual void finishAttributeSection(); virtual void emitInst(uint32_t Inst, char Suffix = '\0'); - virtual void AnnotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE); + virtual void annotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE); virtual void emitThumbSet(MCSymbol *Symbol, const MCExpr *Value); @@ -228,7 +228,7 @@ class MCStreamer { DenseMap SymbolOrdering; /// This is stack of current and previous section values saved by - /// PushSection. + /// pushSection. SmallVector, 4> SectionStack; /// Pointer to the parser's SMLoc if available. This is used to provide @@ -357,7 +357,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. - virtual raw_ostream &GetCommentOS(); + virtual raw_ostream &getCommentOS(); /// Print T and prefix it with the comment string (normally #) and /// optionally a tab. This prints the comment immediately, not at the end of @@ -372,8 +372,8 @@ public: /// Emit added explicit comments. virtual void emitExplicitComments(); - /// AddBlankLine - Emit a blank line to a .s file to pretty it up. - virtual void AddBlankLine() {} + /// Emit a blank line to a .s file to pretty it up. + virtual void addBlankLine() {} /// @} @@ -397,18 +397,18 @@ public: /// Returns an index to represent the order a symbol was emitted in. /// (zero if we did not emit that symbol) - unsigned GetSymbolOrder(const MCSymbol *Sym) const { + unsigned getSymbolOrder(const MCSymbol *Sym) const { return SymbolOrdering.lookup(Sym); } /// Update streamer for a new active section. /// - /// This is called by PopSection and SwitchSection, if the current + /// This is called by popSection and SwitchSection, if the current /// section changes. virtual void changeSection(MCSection *, const MCExpr *); /// Save the current and previous section on the section stack. - void PushSection() { + void pushSection() { SectionStack.push_back( std::make_pair(getCurrentSection(), getPreviousSection())); } @@ -417,7 +417,7 @@ public: /// Calls changeSection as needed. /// /// Returns false if the stack was empty. - bool PopSection() { + bool popSection() { if (SectionStack.size() <= 1) return false; auto I = SectionStack.end(); @@ -432,7 +432,7 @@ public: return true; } - bool SubSection(const MCExpr *Subsection) { + bool subSection(const MCExpr *Subsection) { if (SectionStack.empty()) return false; @@ -450,7 +450,7 @@ public: /// Set the current section where code is being emitted to \p Section. /// This is required to update CurSection. This version does not call /// changeSection. - void SwitchSectionNoChange(MCSection *Section, + void switchSectionNoChange(MCSection *Section, const MCExpr *Subsection = nullptr) { assert(Section && "Cannot switch to a null section!"); MCSectionSubPair curSection = SectionStack.back().first; @@ -468,7 +468,7 @@ public: /// /// Each emitted symbol will be tracked in the ordering table, /// so we can sort on them later. - void AssignFragment(MCSymbol *Symbol, MCFragment *Fragment); + void assignFragment(MCSymbol *Symbol, MCFragment *Fragment); /// Returns the mnemonic for \p MI, if the streamer has access to a /// instruction printer and returns an empty string otherwise. @@ -563,7 +563,7 @@ public: /// Start emitting COFF symbol definition /// /// \param Symbol - The symbol to have its External & Type fields set. - virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol); + virtual void beginCOFFSymbolDef(const MCSymbol *Symbol); /// Emit the storage class of the symbol. /// @@ -576,7 +576,7 @@ public: virtual void emitCOFFSymbolType(int Type); /// Marks the end of the symbol definition. - virtual void EndCOFFSymbolDef(); + virtual void endCOFFSymbolDef(); virtual void emitCOFFSafeSEH(MCSymbol const *Symbol); @@ -1118,7 +1118,7 @@ public: /// Streamer specific finalization. virtual void finishImpl(); /// Finish emission of machine code. - void Finish(SMLoc EndLoc = SMLoc()); + void finish(SMLoc EndLoc = SMLoc()); virtual bool mayHaveInstructions(MCSection &Sec) const { return true; } diff --git a/llvm/include/llvm/MC/MCWinCOFFStreamer.h b/llvm/include/llvm/MC/MCWinCOFFStreamer.h index 386b59ba9fad..0778c4d52c5e 100644 --- a/llvm/include/llvm/MC/MCWinCOFFStreamer.h +++ b/llvm/include/llvm/MC/MCWinCOFFStreamer.h @@ -45,10 +45,10 @@ public: void emitThumbFunc(MCSymbol *Func) override; bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override; void emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override; - void BeginCOFFSymbolDef(MCSymbol const *Symbol) override; + void beginCOFFSymbolDef(MCSymbol const *Symbol) override; void emitCOFFSymbolStorageClass(int StorageClass) override; void emitCOFFSymbolType(int Type) override; - void EndCOFFSymbolDef() override; + void endCOFFSymbolDef() override; void emitCOFFSafeSEH(MCSymbol const *Symbol) override; void emitCOFFSymbolIndex(MCSymbol const *Symbol) override; void emitCOFFSectionIndex(MCSymbol const *Symbol) override; diff --git a/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp b/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp index 7c5ffcf07699..e04a29fbb42b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp @@ -94,7 +94,7 @@ void ARMException::emitTypeInfos(unsigned TTypeEncoding, // Emit the Catch TypeInfos. if (VerboseAsm && !TypeInfos.empty()) { Asm->OutStreamer->AddComment(">> Catch TypeInfos <<"); - Asm->OutStreamer->AddBlankLine(); + Asm->OutStreamer->addBlankLine(); Entry = TypeInfos.size(); } @@ -109,7 +109,7 @@ void ARMException::emitTypeInfos(unsigned TTypeEncoding, // Emit the Exception Specifications. if (VerboseAsm && !FilterIds.empty()) { Asm->OutStreamer->AddComment(">> Filter TypeInfos <<"); - Asm->OutStreamer->AddBlankLine(); + Asm->OutStreamer->addBlankLine(); Entry = 0; } for (std::vector::const_iterator diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 1921d9350f95..dafe9eab8aaa 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -495,11 +495,11 @@ bool AsmPrinter::doInitialization(Module &M) { // Emit module-level inline asm if it exists. if (!M.getModuleInlineAsm().empty()) { OutStreamer->AddComment("Start of file scope inline assembly"); - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); emitInlineAsm(M.getModuleInlineAsm() + "\n", *TM.getMCSubtargetInfo(), TM.Options.MCOptions); OutStreamer->AddComment("End of file scope inline assembly"); - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); } if (MAI->doesSupportDebugInformation()) { @@ -696,9 +696,9 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { if (isVerbose()) { // When printing the control variable __emutls_v.*, // we don't need to print the original TLS variable name. - GV->printAsOperand(OutStreamer->GetCommentOS(), - /*PrintType=*/false, GV->getParent()); - OutStreamer->GetCommentOS() << '\n'; + GV->printAsOperand(OutStreamer->getCommentOS(), + /*PrintType=*/false, GV->getParent()); + OutStreamer->getCommentOS() << '\n'; } } @@ -821,7 +821,7 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { GV->getInitializer()); } - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); // Emit the variable struct for the runtime. MCSection *TLVSect = getObjFileLowering().getTLSExtraDataSection(); @@ -841,7 +841,7 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { OutStreamer->emitIntValue(0, PtrSize); OutStreamer->emitSymbolValue(MangSym, PtrSize); - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); return; } @@ -864,7 +864,7 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { OutStreamer->emitELFSize(EmittedInitSym, MCConstantExpr::create(Size, OutContext)); - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); } /// Emit the directive and value for debug thread local expression @@ -883,7 +883,7 @@ void AsmPrinter::emitFunctionHeader() { const Function &F = MF->getFunction(); if (isVerbose()) - OutStreamer->GetCommentOS() + OutStreamer->getCommentOS() << "-- Begin function " << GlobalValue::dropLLVMManglingEscape(F.getName()) << '\n'; @@ -916,10 +916,10 @@ void AsmPrinter::emitFunctionHeader() { OutStreamer->emitSymbolAttribute(CurrentFnSym, MCSA_Cold); if (isVerbose()) { - F.printAsOperand(OutStreamer->GetCommentOS(), - /*PrintType=*/false, F.getParent()); + F.printAsOperand(OutStreamer->getCommentOS(), + /*PrintType=*/false, F.getParent()); emitFunctionHeaderComment(); - OutStreamer->GetCommentOS() << '\n'; + OutStreamer->getCommentOS() << '\n'; } // Emit the prefix data. @@ -1072,7 +1072,7 @@ void AsmPrinter::emitImplicitDef(const MachineInstr *MI) const { << printReg(RegNo, MF->getSubtarget().getRegisterInfo()); OutStreamer->AddComment(OS.str()); - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); } static void emitKill(const MachineInstr *MI, AsmPrinter &AP) { @@ -1085,7 +1085,7 @@ static void emitKill(const MachineInstr *MI, AsmPrinter &AP) { << printReg(Op.getReg(), AP.MF->getSubtarget().getRegisterInfo()); } AP.OutStreamer->AddComment(OS.str()); - AP.OutStreamer->AddBlankLine(); + AP.OutStreamer->addBlankLine(); } /// emitDebugValueComment - This method handles the target-independent form @@ -1307,7 +1307,7 @@ void AsmPrinter::emitBBAddrMapSection(const MachineFunction &MF) { const MCSymbol *FunctionSymbol = getFunctionBegin(); - OutStreamer->PushSection(); + OutStreamer->pushSection(); OutStreamer->SwitchSection(BBAddrMapSection); OutStreamer->emitSymbolValue(FunctionSymbol, getPointerSize()); // Emit the total number of basic blocks in this function. @@ -1323,7 +1323,7 @@ void AsmPrinter::emitBBAddrMapSection(const MachineFunction &MF) { emitLabelDifferenceAsULEB128(MBB.getEndSymbol(), MBBSymbol); OutStreamer->emitULEB128IntValue(getBBAddrMapMetadata(MBB)); } - OutStreamer->PopSection(); + OutStreamer->popSection(); } void AsmPrinter::emitPseudoProbe(const MachineInstr &MI) { @@ -1351,7 +1351,7 @@ void AsmPrinter::emitStackSizeSection(const MachineFunction &MF) { if (FrameInfo.hasVarSizedObjects()) return; - OutStreamer->PushSection(); + OutStreamer->pushSection(); OutStreamer->SwitchSection(StackSizeSection); const MCSymbol *FunctionSymbol = getFunctionBegin(); @@ -1360,7 +1360,7 @@ void AsmPrinter::emitStackSizeSection(const MachineFunction &MF) { OutStreamer->emitSymbolValue(FunctionSymbol, TM.getProgramPointerSize()); OutStreamer->emitULEB128IntValue(StackSize); - OutStreamer->PopSection(); + OutStreamer->popSection(); } void AsmPrinter::emitStackUsage(const MachineFunction &MF) { @@ -1462,7 +1462,7 @@ void AsmPrinter::emitFunctionBody() { } if (isVerbose()) - emitComments(MI, OutStreamer->GetCommentOS()); + emitComments(MI, OutStreamer->getCommentOS()); switch (MI.getOpcode()) { case TargetOpcode::CFI_INSTRUCTION: @@ -1691,9 +1691,9 @@ void AsmPrinter::emitFunctionBody() { emitPatchableFunctionEntries(); if (isVerbose()) - OutStreamer->GetCommentOS() << "-- End function\n"; + OutStreamer->getCommentOS() << "-- End function\n"; - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); } /// Compute the number of Global Variables that uses a Constant. @@ -1811,13 +1811,13 @@ void AsmPrinter::emitGlobalAlias(Module &M, const GlobalAlias &GA) { if (IsFunction) { OutStreamer->emitSymbolAttribute(Name, MCSA_ELF_TypeFunction); if (TM.getTargetTriple().isOSBinFormatCOFF()) { - OutStreamer->BeginCOFFSymbolDef(Name); + OutStreamer->beginCOFFSymbolDef(Name); OutStreamer->emitCOFFSymbolStorageClass( GA.hasLocalLinkage() ? COFF::IMAGE_SYM_CLASS_STATIC : COFF::IMAGE_SYM_CLASS_EXTERNAL); OutStreamer->emitCOFFSymbolType(COFF::IMAGE_SYM_DTYPE_FUNCTION << COFF::SCT_COMPLEX_TYPE_SHIFT); - OutStreamer->EndCOFFSymbolDef(); + OutStreamer->endCOFFSymbolDef(); } } @@ -2135,7 +2135,7 @@ bool AsmPrinter::doFinalization(Module &M) { MMI = nullptr; AddrLabelSymbols = nullptr; - OutStreamer->Finish(); + OutStreamer->finish(); OutStreamer->reset(); OwnedMLI.reset(); OwnedMDT.reset(); @@ -2578,7 +2578,7 @@ void AsmPrinter::emitModuleCommandLines(Module &M) { if (!NMD || !NMD->getNumOperands()) return; - OutStreamer->PushSection(); + OutStreamer->pushSection(); OutStreamer->SwitchSection(CommandLine); OutStreamer->emitZeros(1); for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { @@ -2589,7 +2589,7 @@ void AsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitBytes(S->getString()); OutStreamer->emitZeros(1); } - OutStreamer->PopSection(); + OutStreamer->popSection(); } //===--------------------------------------------------------------------===// @@ -2923,8 +2923,8 @@ static void emitGlobalConstantDataSequential(const DataLayout &DL, if (isa(CDS->getElementType())) { for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) { if (AP.isVerbose()) - AP.OutStreamer->GetCommentOS() << format("0x%" PRIx64 "\n", - CDS->getElementAsInteger(i)); + AP.OutStreamer->getCommentOS() + << format("0x%" PRIx64 "\n", CDS->getElementAsInteger(i)); AP.OutStreamer->emitIntValue(CDS->getElementAsInteger(i), ElementByteSize); } @@ -3010,8 +3010,8 @@ static void emitGlobalConstantFP(APFloat APF, Type *ET, AsmPrinter &AP) { if (AP.isVerbose()) { SmallString<8> StrVal; APF.toString(StrVal); - ET->print(AP.OutStreamer->GetCommentOS()); - AP.OutStreamer->GetCommentOS() << ' ' << StrVal << '\n'; + ET->print(AP.OutStreamer->getCommentOS()); + AP.OutStreamer->getCommentOS() << ' ' << StrVal << '\n'; } // Now iterate through the APInt chunks, emitting them in endian-correct @@ -3216,8 +3216,8 @@ static void emitGlobalConstantImpl(const DataLayout &DL, const Constant *CV, if (StoreSize <= 8) { if (AP.isVerbose()) - AP.OutStreamer->GetCommentOS() << format("0x%" PRIx64 "\n", - CI->getZExtValue()); + AP.OutStreamer->getCommentOS() + << format("0x%" PRIx64 "\n", CI->getZExtValue()); AP.OutStreamer->emitIntValue(CI->getZExtValue(), StoreSize); } else { emitGlobalConstantLargeInt(CI, AP); @@ -3428,7 +3428,7 @@ static void emitBasicBlockLoopComments(const MachineBasicBlock &MBB, // Otherwise, it is a loop header. Print out information about child and // parent loops. - raw_ostream &OS = AP.OutStreamer->GetCommentOS(); + raw_ostream &OS = AP.OutStreamer->getCommentOS(); PrintParentLoopComment(OS, Loop->getParentLoop(), AP.getFunctionNumber()); @@ -3490,9 +3490,9 @@ void AsmPrinter::emitBasicBlockStart(const MachineBasicBlock &MBB) { if (isVerbose()) { if (BB) { if (BB->hasName()) { - BB->printAsOperand(OutStreamer->GetCommentOS(), + BB->printAsOperand(OutStreamer->getCommentOS(), /*PrintType=*/false, BB->getModule()); - OutStreamer->GetCommentOS() << '\n'; + OutStreamer->getCommentOS() << '\n'; } } diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index 26f500987ffb..421cc71d3982 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -978,11 +978,11 @@ void CodeViewDebug::emitInlineeLinesSubsection() { assert(TypeIndices.count({SP, nullptr})); TypeIndex InlineeIdx = TypeIndices[{SP, nullptr}]; - OS.AddBlankLine(); + OS.addBlankLine(); unsigned FileId = maybeRecordFile(SP->getFile()); OS.AddComment("Inlined function " + SP->getName() + " starts at " + SP->getFilename() + Twine(':') + Twine(SP->getLine())); - OS.AddBlankLine(); + OS.addBlankLine(); OS.AddComment("Type index of inlined function"); OS.emitInt32(InlineeIdx.getIndex()); OS.AddComment("Offset into filechecksum table"); diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp index 67565c40de19..ae18024303cc 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp @@ -373,7 +373,7 @@ void DIEInteger::emitValue(const AsmPrinter *Asm, dwarf::Form Form) const { case dwarf::DW_FORM_flag_present: // Emit something to keep the lines and comments in sync. // FIXME: Is there a better way to do this? - Asm->OutStreamer->AddBlankLine(); + Asm->OutStreamer->addBlankLine(); return; case dwarf::DW_FORM_flag: case dwarf::DW_FORM_ref1: diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 37ae84ad9bf1..04e95a72657e 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2950,8 +2950,8 @@ void DwarfDebug::emitDebugARanges() { // Sort the symbols by offset within the section. llvm::stable_sort(List, [&](const SymbolCU &A, const SymbolCU &B) { - unsigned IA = A.Sym ? Asm->OutStreamer->GetSymbolOrder(A.Sym) : 0; - unsigned IB = B.Sym ? Asm->OutStreamer->GetSymbolOrder(B.Sym) : 0; + unsigned IA = A.Sym ? Asm->OutStreamer->getSymbolOrder(A.Sym) : 0; + unsigned IB = B.Sym ? Asm->OutStreamer->getSymbolOrder(B.Sym) : 0; // Symbols with no order assigned should be placed at the end. // (e.g. section end labels) diff --git a/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp b/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp index a68f34549f87..70a7e8187297 100644 --- a/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp @@ -805,7 +805,7 @@ void EHStreamer::emitTypeInfos(unsigned TTypeEncoding, MCSymbol *TTBaseLabel) { // Emit the Catch TypeInfos. if (VerboseAsm && !TypeInfos.empty()) { Asm->OutStreamer->AddComment(">> Catch TypeInfos <<"); - Asm->OutStreamer->AddBlankLine(); + Asm->OutStreamer->addBlankLine(); Entry = TypeInfos.size(); } @@ -820,7 +820,7 @@ void EHStreamer::emitTypeInfos(unsigned TTypeEncoding, MCSymbol *TTBaseLabel) { // Emit the Exception Specifications. if (VerboseAsm && !FilterIds.empty()) { Asm->OutStreamer->AddComment(">> Filter TypeInfos <<"); - Asm->OutStreamer->AddBlankLine(); + Asm->OutStreamer->addBlankLine(); Entry = 0; } for (std::vector::const_iterator diff --git a/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp index 3ade262d9af2..d26481f56ee8 100644 --- a/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp @@ -147,7 +147,7 @@ void OcamlGCMetadataPrinter::finishAssembly(Module &M, GCModuleInfo &Info, AP.OutStreamer->AddComment("live roots for " + Twine(FI->getFunction().getName())); - AP.OutStreamer->AddBlankLine(); + AP.OutStreamer->addBlankLine(); for (GCFunctionInfo::iterator J = FI->begin(), JE = FI->end(); J != JE; ++J) { diff --git a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp index cdbd112dd6d4..6ae550871d06 100644 --- a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp @@ -145,7 +145,7 @@ void WinException::endFunction(const MachineFunction *MF) { return; if (shouldEmitPersonality || shouldEmitLSDA) { - Asm->OutStreamer->PushSection(); + Asm->OutStreamer->pushSection(); // Just switch sections to the right xdata section. MCSection *XData = Asm->OutStreamer->getAssociatedXDataSection( @@ -165,7 +165,7 @@ void WinException::endFunction(const MachineFunction *MF) { else emitExceptionTable(); - Asm->OutStreamer->PopSection(); + Asm->OutStreamer->popSection(); } if (!MF->getCatchretTargets().empty()) { @@ -205,11 +205,11 @@ void WinException::beginFunclet(const MachineBasicBlock &MBB, Sym = getMCSymbolForMBB(Asm, &MBB); // Describe our funclet symbol as a function with internal linkage. - Asm->OutStreamer->BeginCOFFSymbolDef(Sym); + Asm->OutStreamer->beginCOFFSymbolDef(Sym); Asm->OutStreamer->emitCOFFSymbolStorageClass(COFF::IMAGE_SYM_CLASS_STATIC); Asm->OutStreamer->emitCOFFSymbolType(COFF::IMAGE_SYM_DTYPE_FUNCTION << COFF::SCT_COMPLEX_TYPE_SHIFT); - Asm->OutStreamer->EndCOFFSymbolDef(); + Asm->OutStreamer->endCOFFSymbolDef(); // We want our funclet's entry point to be aligned such that no nops will be // present after the label. diff --git a/llvm/lib/CodeGen/StackMaps.cpp b/llvm/lib/CodeGen/StackMaps.cpp index 36e8f129ea15..c20e3216a7d0 100644 --- a/llvm/lib/CodeGen/StackMaps.cpp +++ b/llvm/lib/CodeGen/StackMaps.cpp @@ -732,7 +732,7 @@ void StackMaps::serializeToStackMapSection() { emitFunctionFrameRecords(OS); emitConstantPoolEntries(OS); emitCallsiteEntries(OS); - OS.AddBlankLine(); + OS.addBlankLine(); // Clean up. CSInfos.clear(); diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 7e2dd1546b5b..ed2a15d5eb4c 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -369,7 +369,7 @@ void TargetLoweringObjectFileELF::emitModuleMetadata(MCStreamer &Streamer, Streamer.emitLabel(C.getOrCreateSymbol(StringRef("OBJC_IMAGE_INFO"))); Streamer.emitInt32(Version); Streamer.emitInt32(Flags); - Streamer.AddBlankLine(); + Streamer.addBlankLine(); } emitCGProfileMetadata(Streamer, M); @@ -1231,7 +1231,7 @@ void TargetLoweringObjectFileMachO::emitModuleMetadata(MCStreamer &Streamer, getOrCreateSymbol(StringRef("L_OBJC_IMAGE_INFO"))); Streamer.emitInt32(VersionVal); Streamer.emitInt32(ImageInfoFlags); - Streamer.AddBlankLine(); + Streamer.addBlankLine(); } static void checkMachOComdat(const GlobalValue *GV) { @@ -1781,7 +1781,7 @@ void TargetLoweringObjectFileCOFF::emitModuleMetadata(MCStreamer &Streamer, Streamer.emitLabel(C.getOrCreateSymbol(StringRef("OBJC_IMAGE_INFO"))); Streamer.emitInt32(Version); Streamer.emitInt32(Flags); - Streamer.AddBlankLine(); + Streamer.addBlankLine(); } emitCGProfileMetadata(Streamer, M); diff --git a/llvm/lib/DWARFLinker/DWARFStreamer.cpp b/llvm/lib/DWARFLinker/DWARFStreamer.cpp index b0ed691298ce..88b15d5c975d 100644 --- a/llvm/lib/DWARFLinker/DWARFStreamer.cpp +++ b/llvm/lib/DWARFLinker/DWARFStreamer.cpp @@ -113,7 +113,7 @@ bool DwarfStreamer::init(Triple TheTriple, return true; } -void DwarfStreamer::finish() { MS->Finish(); } +void DwarfStreamer::finish() { MS->finish(); } void DwarfStreamer::switchToDebugInfoSection(unsigned DwarfVersion) { MS->SwitchSection(MOFI->getDwarfInfoSection()); diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index cf9d025863f7..3d0853f74c5b 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -126,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; @@ -138,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 /// @{ @@ -179,10 +177,10 @@ public: bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override; void emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override; - void BeginCOFFSymbolDef(const MCSymbol *Symbol) override; + void beginCOFFSymbolDef(const MCSymbol *Symbol) override; void emitCOFFSymbolStorageClass(int StorageClass) override; void emitCOFFSymbolType(int Type) override; - void EndCOFFSymbolDef() override; + void endCOFFSymbolDef() override; void emitCOFFSafeSEH(MCSymbol const *Symbol) override; void emitCOFFSymbolIndex(MCSymbol const *Symbol) override; void emitCOFFSectionIndex(MCSymbol const *Symbol) override; @@ -790,7 +788,7 @@ 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 << ';'; @@ -807,7 +805,7 @@ void MCAsmStreamer::emitCOFFSymbolType(int Type) { EmitEOL(); } -void MCAsmStreamer::EndCOFFSymbolDef() { +void MCAsmStreamer::endCOFFSymbolDef() { OS << "\t.endef"; EmitEOL(); } @@ -999,7 +997,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 "; @@ -1026,7 +1024,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. @@ -2096,7 +2094,7 @@ void MCAsmStreamer::emitWinEHHandlerData(SMLoc Loc) { MCSection *TextSec = &CurFrame->Function->getSection(); MCSection *XData = getAssociatedXDataSection(TextSec); - SwitchSectionNoChange(XData); + switchSectionNoChange(XData); OS << "\t.seh_handlerdata"; EmitEOL(); @@ -2176,7 +2174,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 Fixups; raw_svector_ostream VecOS(Code); @@ -2282,8 +2280,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()) @@ -2293,7 +2291,7 @@ void MCAsmStreamer::emitInstruction(const MCInst &Inst, StringRef Comments = CommentToEmit; if (Comments.size() && Comments.back() != '\n') - GetCommentOS() << "\n"; + getCommentOS() << "\n"; EmitEOL(); } @@ -2509,7 +2507,7 @@ void MCAsmStreamer::doFinalizationAtSectionEnd(MCSection *Section) { if (MAI->usesDwarfFileAndLocDirectives()) return; - SwitchSectionNoChange(Section); + switchSectionNoChange(Section); MCSymbol *Sym = getCurrentSectionOnly()->getEndSymbol(getContext()); diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp index e287f8f51abb..e8fc6af98e52 100644 --- a/llvm/lib/MC/MCELFStreamer.cpp +++ b/llvm/lib/MC/MCELFStreamer.cpp @@ -382,7 +382,7 @@ void MCELFStreamer::emitCGProfileEntry(const MCSymbolRefExpr *From, void MCELFStreamer::emitIdent(StringRef IdentString) { MCSection *Comment = getAssembler().getContext().getELFSection( ".comment", ELF::SHT_PROGBITS, ELF::SHF_MERGE | ELF::SHF_STRINGS, 1); - PushSection(); + pushSection(); SwitchSection(Comment); if (!SeenIdent) { emitInt8(0); @@ -390,7 +390,7 @@ void MCELFStreamer::emitIdent(StringRef IdentString) { } emitBytes(IdentString); emitInt8(0); - PopSection(); + popSection(); } void MCELFStreamer::fixSymbolsInTLSFixups(const MCExpr *expr) { @@ -512,7 +512,7 @@ void MCELFStreamer::finalizeCGProfile() { MCSection *CGProfile = getAssembler().getContext().getELFSection( ".llvm.call-graph-profile", ELF::SHT_LLVM_CALL_GRAPH_PROFILE, ELF::SHF_EXCLUDE, /*sizeof(Elf_CGProfile_Impl<>)=*/8); - PushSection(); + pushSection(); SwitchSection(CGProfile); uint64_t Offset = 0; for (MCAssembler::CGProfileEntry &E : Asm.CGProfile) { @@ -521,7 +521,7 @@ void MCELFStreamer::finalizeCGProfile() { emitIntValue(E.Count, sizeof(uint64_t)); Offset += sizeof(uint64_t); } - PopSection(); + popSection(); } void MCELFStreamer::emitInstToFragment(const MCInst &Inst, diff --git a/llvm/lib/MC/MCMachOStreamer.cpp b/llvm/lib/MC/MCMachOStreamer.cpp index a060fa90e66c..f22a41ed1071 100644 --- a/llvm/lib/MC/MCMachOStreamer.cpp +++ b/llvm/lib/MC/MCMachOStreamer.cpp @@ -462,7 +462,7 @@ void MCMachOStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol, // section. } - PushSection(); + pushSection(); SwitchSection(Section); // The symbol may not be present, which only creates the section. @@ -471,7 +471,7 @@ void MCMachOStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol, emitLabel(Symbol); emitZeros(Size); } - PopSection(); + popSection(); } // This should always be called with the thread local bss section. Like the diff --git a/llvm/lib/MC/MCNullStreamer.cpp b/llvm/lib/MC/MCNullStreamer.cpp index 2af01081200a..83e8962451d5 100644 --- a/llvm/lib/MC/MCNullStreamer.cpp +++ b/llvm/lib/MC/MCNullStreamer.cpp @@ -42,10 +42,10 @@ namespace { uint64_t Size = 0, unsigned ByteAlignment = 0, SMLoc Loc = SMLoc()) override {} void emitGPRel32Value(const MCExpr *Value) override {} - void BeginCOFFSymbolDef(const MCSymbol *Symbol) override {} + void beginCOFFSymbolDef(const MCSymbol *Symbol) override {} void emitCOFFSymbolStorageClass(int StorageClass) override {} void emitCOFFSymbolType(int Type) override {} - void EndCOFFSymbolDef() override {} + void endCOFFSymbolDef() override {} void emitXCOFFSymbolLinkageWithVisibility(MCSymbol *Symbol, MCSymbolAttr Linkage, MCSymbolAttr Visibility) override {} diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 9b0ec6be570c..35d75a919da3 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -1073,7 +1073,7 @@ bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) { if (auto *TS = Out.getTargetStreamer()) TS->emitConstantPools(); - Out.Finish(Lexer.getLoc()); + Out.finish(Lexer.getLoc()); } return HadError || getContext().hadError(); @@ -1786,7 +1786,7 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info, // if this is a line comment we can drop it safely if (getTok().getString().empty() || getTok().getString().front() == '\r' || getTok().getString().front() == '\n') - Out.AddBlankLine(); + Out.addBlankLine(); Lex(); return false; } @@ -1943,7 +1943,7 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info, } // Consume any end of statement token, if present, to avoid spurious - // AddBlankLine calls(). + // addBlankLine calls(). if (getTok().is(AsmToken::EndOfStatement)) { Lex(); } @@ -6310,7 +6310,7 @@ bool HLASMAsmParser::parseStatement(ParseStatementInfo &Info, // if this is a line comment we can drop it safely if (getTok().getString().empty() || getTok().getString().front() == '\r' || getTok().getString().front() == '\n') - Out.AddBlankLine(); + Out.addBlankLine(); Lex(); return false; } @@ -6326,7 +6326,7 @@ bool HLASMAsmParser::parseStatement(ParseStatementInfo &Info, if (Lexer.is(AsmToken::EndOfStatement)) { if (getTok().getString().front() == '\n' || getTok().getString().front() == '\r') { - Out.AddBlankLine(); + Out.addBlankLine(); Lex(); return false; } diff --git a/llvm/lib/MC/MCParser/COFFAsmParser.cpp b/llvm/lib/MC/MCParser/COFFAsmParser.cpp index f57cecf261be..c7d54b337132 100644 --- a/llvm/lib/MC/MCParser/COFFAsmParser.cpp +++ b/llvm/lib/MC/MCParser/COFFAsmParser.cpp @@ -416,7 +416,7 @@ bool COFFAsmParser::ParseDirectiveDef(StringRef, SMLoc) { MCSymbol *Sym = getContext().getOrCreateSymbol(SymbolName); - getStreamer().BeginCOFFSymbolDef(Sym); + getStreamer().beginCOFFSymbolDef(Sym); Lex(); return false; @@ -450,7 +450,7 @@ bool COFFAsmParser::ParseDirectiveType(StringRef, SMLoc) { bool COFFAsmParser::ParseDirectiveEndef(StringRef, SMLoc) { Lex(); - getStreamer().EndCOFFSymbolDef(); + getStreamer().endCOFFSymbolDef(); return false; } diff --git a/llvm/lib/MC/MCParser/COFFMasmParser.cpp b/llvm/lib/MC/MCParser/COFFMasmParser.cpp index 0653808a190b..b39b2ea70e64 100644 --- a/llvm/lib/MC/MCParser/COFFMasmParser.cpp +++ b/llvm/lib/MC/MCParser/COFFMasmParser.cpp @@ -293,13 +293,13 @@ bool COFFMasmParser::ParseDirectiveIncludelib(StringRef Directive, SMLoc Loc) { unsigned Flags = COFF::IMAGE_SCN_MEM_PRELOAD | COFF::IMAGE_SCN_MEM_16BIT; SectionKind Kind = computeSectionKind(Flags); - getStreamer().PushSection(); + getStreamer().pushSection(); getStreamer().SwitchSection(getContext().getCOFFSection( ".drectve", Flags, Kind, "", (COFF::COMDATType)(0))); getStreamer().emitBytes("/DEFAULTLIB:"); getStreamer().emitBytes(Lib); getStreamer().emitBytes(" "); - getStreamer().PopSection(); + getStreamer().popSection(); return false; } diff --git a/llvm/lib/MC/MCParser/DarwinAsmParser.cpp b/llvm/lib/MC/MCParser/DarwinAsmParser.cpp index 5274f30be7e8..d3341503aa67 100644 --- a/llvm/lib/MC/MCParser/DarwinAsmParser.cpp +++ b/llvm/lib/MC/MCParser/DarwinAsmParser.cpp @@ -728,10 +728,10 @@ bool DarwinAsmParser::parseDirectiveSection(StringRef, SMLoc) { /// ParseDirectivePushSection: /// ::= .pushsection identifier (',' identifier)* bool DarwinAsmParser::parseDirectivePushSection(StringRef S, SMLoc Loc) { - getStreamer().PushSection(); + getStreamer().pushSection(); if (parseDirectiveSection(S, Loc)) { - getStreamer().PopSection(); + getStreamer().popSection(); return true; } @@ -741,7 +741,7 @@ bool DarwinAsmParser::parseDirectivePushSection(StringRef S, SMLoc Loc) { /// ParseDirectivePopSection: /// ::= .popsection bool DarwinAsmParser::parseDirectivePopSection(StringRef, SMLoc) { - if (!getStreamer().PopSection()) + if (!getStreamer().popSection()) return TokError(".popsection without corresponding .pushsection"); return false; } diff --git a/llvm/lib/MC/MCParser/ELFAsmParser.cpp b/llvm/lib/MC/MCParser/ELFAsmParser.cpp index 34f11eb25dbe..91bcecd1e880 100644 --- a/llvm/lib/MC/MCParser/ELFAsmParser.cpp +++ b/llvm/lib/MC/MCParser/ELFAsmParser.cpp @@ -379,10 +379,10 @@ unsigned ELFAsmParser::parseSunStyleSectionFlags() { bool ELFAsmParser::ParseDirectivePushSection(StringRef s, SMLoc loc) { - getStreamer().PushSection(); + getStreamer().pushSection(); if (ParseSectionArguments(/*IsPush=*/true, loc)) { - getStreamer().PopSection(); + getStreamer().popSection(); return true; } @@ -390,7 +390,7 @@ bool ELFAsmParser::ParseDirectivePushSection(StringRef s, SMLoc loc) { } bool ELFAsmParser::ParseDirectivePopSection(StringRef, SMLoc) { - if (!getStreamer().PopSection()) + if (!getStreamer().popSection()) return TokError(".popsection without corresponding .pushsection"); return false; } @@ -860,7 +860,7 @@ bool ELFAsmParser::ParseDirectiveVersion(StringRef, SMLoc) { MCSection *Note = getContext().getELFSection(".note", ELF::SHT_NOTE, 0); - getStreamer().PushSection(); + getStreamer().pushSection(); getStreamer().SwitchSection(Note); getStreamer().emitInt32(Data.size() + 1); // namesz getStreamer().emitInt32(0); // descsz = 0 (no description). @@ -868,7 +868,7 @@ bool ELFAsmParser::ParseDirectiveVersion(StringRef, SMLoc) { getStreamer().emitBytes(Data); // name getStreamer().emitInt8(0); // NUL getStreamer().emitValueToAlignment(4); - getStreamer().PopSection(); + getStreamer().popSection(); return false; } @@ -910,7 +910,7 @@ bool ELFAsmParser::ParseDirectiveSubsection(StringRef, SMLoc) { Lex(); - getStreamer().SubSection(Subsection); + getStreamer().subSection(Subsection); return false; } diff --git a/llvm/lib/MC/MCParser/MasmParser.cpp b/llvm/lib/MC/MCParser/MasmParser.cpp index 86dc3a72907a..8e6db039c2c8 100644 --- a/llvm/lib/MC/MCParser/MasmParser.cpp +++ b/llvm/lib/MC/MCParser/MasmParser.cpp @@ -1429,7 +1429,7 @@ bool MasmParser::Run(bool NoInitialTextSection, bool NoFinalize) { // Finalize the output stream if there are no errors and if the client wants // us to. if (!HadError && !NoFinalize) - Out.Finish(Lexer.getLoc()); + Out.finish(Lexer.getLoc()); return HadError || getContext().hadError(); } @@ -2092,7 +2092,7 @@ bool MasmParser::parseStatement(ParseStatementInfo &Info, // If this is a line comment we can drop it safely. if (getTok().getString().empty() || getTok().getString().front() == '\r' || getTok().getString().front() == '\n') - Out.AddBlankLine(); + Out.addBlankLine(); Lex(); return false; } @@ -2281,7 +2281,7 @@ bool MasmParser::parseStatement(ParseStatementInfo &Info, } // Consume any end of statement token, if present, to avoid spurious - // AddBlankLine calls(). + // addBlankLine calls(). if (getTok().is(AsmToken::EndOfStatement)) { Lex(); } diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index 1fe60fa41070..066a7cd265dc 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -108,7 +108,7 @@ void MCStreamer::reset() { SectionStack.push_back(std::pair()); } -raw_ostream &MCStreamer::GetCommentOS() { +raw_ostream &MCStreamer::getCommentOS() { // By default, discard comments. return nulls(); } @@ -404,7 +404,7 @@ void MCStreamer::initSections(bool NoExecStack, const MCSubtargetInfo &STI) { SwitchSection(getContext().getObjectFileInfo()->getTextSection()); } -void MCStreamer::AssignFragment(MCSymbol *Symbol, MCFragment *Fragment) { +void MCStreamer::assignFragment(MCSymbol *Symbol, MCFragment *Fragment) { assert(Fragment); Symbol->setFragment(Fragment); @@ -992,7 +992,7 @@ void MCStreamer::emitWindowsUnwindTables() {} void MCStreamer::emitWindowsUnwindTables(WinEH::FrameInfo *Frame) {} -void MCStreamer::Finish(SMLoc EndLoc) { +void MCStreamer::finish(SMLoc EndLoc) { if ((!DwarfFrameInfos.empty() && !DwarfFrameInfos.back().End) || (!WinFrameInfos.empty() && !WinFrameInfos.back()->End)) { getContext().reportError(EndLoc, "Unfinished frame!"); @@ -1144,10 +1144,10 @@ void MCStreamer::emitAbsoluteSymbolDiffAsULEB128(const MCSymbol *Hi, void MCStreamer::emitAssemblerFlag(MCAssemblerFlag Flag) {} void MCStreamer::emitThumbFunc(MCSymbol *Func) {} void MCStreamer::emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {} -void MCStreamer::BeginCOFFSymbolDef(const MCSymbol *Symbol) { +void MCStreamer::beginCOFFSymbolDef(const MCSymbol *Symbol) { llvm_unreachable("this directive only supported on COFF targets"); } -void MCStreamer::EndCOFFSymbolDef() { +void MCStreamer::endCOFFSymbolDef() { llvm_unreachable("this directive only supported on COFF targets"); } void MCStreamer::emitFileDirective(StringRef Filename) {} diff --git a/llvm/lib/MC/MCWinCOFFStreamer.cpp b/llvm/lib/MC/MCWinCOFFStreamer.cpp index 0fcc7f5170b9..d3df7874d532 100644 --- a/llvm/lib/MC/MCWinCOFFStreamer.cpp +++ b/llvm/lib/MC/MCWinCOFFStreamer.cpp @@ -133,7 +133,7 @@ void MCWinCOFFStreamer::emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) { llvm_unreachable("not implemented"); } -void MCWinCOFFStreamer::BeginCOFFSymbolDef(MCSymbol const *S) { +void MCWinCOFFStreamer::beginCOFFSymbolDef(MCSymbol const *S) { auto *Symbol = cast(S); if (CurSymbol) Error("starting a new symbol definition without completing the " @@ -172,7 +172,7 @@ void MCWinCOFFStreamer::emitCOFFSymbolType(int Type) { cast(CurSymbol)->setType((uint16_t)Type); } -void MCWinCOFFStreamer::EndCOFFSymbolDef() { +void MCWinCOFFStreamer::endCOFFSymbolDef() { if (!CurSymbol) Error("ending symbol definition without starting one"); CurSymbol = nullptr; @@ -286,10 +286,10 @@ void MCWinCOFFStreamer::emitCommonSymbol(MCSymbol *S, uint64_t Size, OS << " -aligncomm:\"" << Symbol->getName() << "\"," << Log2_32_Ceil(ByteAlignment); - PushSection(); + pushSection(); SwitchSection(MFI->getDrectveSection()); emitBytes(Directive); - PopSection(); + popSection(); } } @@ -298,13 +298,13 @@ void MCWinCOFFStreamer::emitLocalCommonSymbol(MCSymbol *S, uint64_t Size, auto *Symbol = cast(S); MCSection *Section = getContext().getObjectFileInfo()->getBSSSection(); - PushSection(); + pushSection(); SwitchSection(Section); emitValueToAlignment(ByteAlignment, 0, 1, 0); emitLabel(Symbol); Symbol->setExternal(false); emitZeros(Size); - PopSection(); + popSection(); } void MCWinCOFFStreamer::emitWeakReference(MCSymbol *AliasS, diff --git a/llvm/lib/Object/RecordStreamer.h b/llvm/lib/Object/RecordStreamer.h index 80ff5f044416..5c6541e5052d 100644 --- a/llvm/lib/Object/RecordStreamer.h +++ b/llvm/lib/Object/RecordStreamer.h @@ -57,10 +57,10 @@ public: // Ignore COFF-specific directives; we do not need any information from them, // but the default implementation of these methods crashes, so we override // them with versions that do nothing. - void BeginCOFFSymbolDef(const MCSymbol *Symbol) override {} + void beginCOFFSymbolDef(const MCSymbol *Symbol) override {} void emitCOFFSymbolStorageClass(int StorageClass) override {} void emitCOFFSymbolType(int Type) override {} - void EndCOFFSymbolDef() override {} + void endCOFFSymbolDef() override {} /// Record .symver aliases for later processing. void emitELFSymverDirective(const MCSymbol *OriginalSym, StringRef Name, diff --git a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp index 833969d598d8..d0363d005197 100644 --- a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp +++ b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp @@ -143,10 +143,10 @@ public: int Type = COFF::IMAGE_SYM_DTYPE_FUNCTION << COFF::SCT_COMPLEX_TYPE_SHIFT; - OutStreamer->BeginCOFFSymbolDef(CurrentFnSym); + OutStreamer->beginCOFFSymbolDef(CurrentFnSym); OutStreamer->emitCOFFSymbolStorageClass(Scl); OutStreamer->emitCOFFSymbolType(Type); - OutStreamer->EndCOFFSymbolDef(); + OutStreamer->endCOFFSymbolDef(); } // Emit the rest of the function body. @@ -204,10 +204,10 @@ void AArch64AsmPrinter::emitStartOfAsmFile(Module &M) { // Emit an absolute @feat.00 symbol. This appears to be some kind of // compiler features bitfield read by link.exe. MCSymbol *S = MMI->getContext().getOrCreateSymbol(StringRef("@feat.00")); - OutStreamer->BeginCOFFSymbolDef(S); + OutStreamer->beginCOFFSymbolDef(S); OutStreamer->emitCOFFSymbolStorageClass(COFF::IMAGE_SYM_CLASS_STATIC); OutStreamer->emitCOFFSymbolType(COFF::IMAGE_SYM_DTYPE_NULL); - OutStreamer->EndCOFFSymbolDef(); + OutStreamer->endCOFFSymbolDef(); int64_t Feat00Flags = 0; if (M.getModuleFlag("cfguard")) { @@ -251,7 +251,7 @@ void AArch64AsmPrinter::emitFunctionHeaderComment() { const AArch64FunctionInfo *FI = MF->getInfo(); Optional OutlinerString = FI->getOutliningStyle(); if (OutlinerString != None) - OutStreamer->GetCommentOS() << ' ' << OutlinerString; + OutStreamer->getCommentOS() << ' ' << OutlinerString; } void AArch64AsmPrinter::LowerPATCHABLE_FUNCTION_ENTER(const MachineInstr &MI) diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp index 8cd64e537c59..c7a80ca41b99 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp @@ -247,7 +247,7 @@ void AMDGPUAsmPrinter::emitFunctionBodyEnd() { auto &ObjectFileInfo = *Context.getObjectFileInfo(); auto &ReadOnlySection = *ObjectFileInfo.getReadOnlySection(); - Streamer.PushSection(); + Streamer.pushSection(); Streamer.SwitchSection(&ReadOnlySection); // CP microcode requires the kernel descriptor to be allocated on 64 byte @@ -269,7 +269,7 @@ void AMDGPUAsmPrinter::emitFunctionBodyEnd() { CurrentProgramInfo.FlatUsed), CurrentProgramInfo.VCCUsed, CurrentProgramInfo.FlatUsed); - Streamer.PopSection(); + Streamer.popSection(); } void AMDGPUAsmPrinter::emitFunctionEntryLabel() { diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp index 6741db753626..63ffd3f599b4 100644 --- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp +++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp @@ -533,7 +533,7 @@ void AMDGPUTargetELFStreamer::EmitNote( if (STI.getTargetTriple().getOS() == Triple::AMDHSA) NoteFlags = ELF::SHF_ALLOC; - S.PushSection(); + S.pushSection(); S.SwitchSection( Context.getELFSection(ElfNote::SectionName, ELF::SHT_NOTE, NoteFlags)); S.emitInt32(NameSZ); // namesz @@ -543,7 +543,7 @@ void AMDGPUTargetELFStreamer::EmitNote( S.emitValueToAlignment(4, 0, 1, 0); // padding 0 EmitDesc(S); // desc S.emitValueToAlignment(4, 0, 1, 0); // padding 0 - S.PopSection(); + S.popSection(); } unsigned AMDGPUTargetELFStreamer::getEFlags() { @@ -717,9 +717,9 @@ void AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(const amd_kernel_code_t &Header) { MCStreamer &OS = getStreamer(); - OS.PushSection(); + OS.pushSection(); OS.emitBytes(StringRef((const char*)&Header, sizeof(Header))); - OS.PopSection(); + OS.popSection(); } void AMDGPUTargetELFStreamer::EmitAMDGPUSymbolType(StringRef SymbolName, @@ -836,11 +836,11 @@ bool AMDGPUTargetELFStreamer::EmitCodeEnd(const MCSubtargetInfo &STI) { } MCStreamer &OS = getStreamer(); - OS.PushSection(); + OS.pushSection(); OS.emitValueToAlignment(CacheLineSize, Encoded_pad, 4); for (unsigned I = 0; I < FillSize; I += 4) OS.emitInt32(Encoded_pad); - OS.PopSection(); + OS.popSection(); return true; } diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp index f699a5b934c2..f454b83c9da3 100644 --- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp @@ -161,10 +161,10 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) { : COFF::IMAGE_SYM_CLASS_EXTERNAL; int Type = COFF::IMAGE_SYM_DTYPE_FUNCTION << COFF::SCT_COMPLEX_TYPE_SHIFT; - OutStreamer->BeginCOFFSymbolDef(CurrentFnSym); + OutStreamer->beginCOFFSymbolDef(CurrentFnSym); OutStreamer->emitCOFFSymbolStorageClass(Scl); OutStreamer->emitCOFFSymbolType(Type); - OutStreamer->EndCOFFSymbolDef(); + OutStreamer->endCOFFSymbolDef(); } // Emit the rest of the function body. @@ -542,7 +542,7 @@ void ARMAsmPrinter::emitEndOfAsmFile(Module &M) { emitNonLazySymbolPointer(*OutStreamer, Stub.first, Stub.second); Stubs.clear(); - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); } Stubs = MMIMacho.GetThreadLocalGVStubList(); @@ -555,7 +555,7 @@ void ARMAsmPrinter::emitEndOfAsmFile(Module &M) { emitNonLazySymbolPointer(*OutStreamer, Stub.first, Stub.second); Stubs.clear(); - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); } // Funny Darwin hack: This flag tells the linker that no global symbols diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 522156abc88b..fc40308be755 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -11947,7 +11947,7 @@ bool ARMAsmParser::parseDirectiveTLSDescSeq(SMLoc L) { if (parseEOL()) return true; - getTargetStreamer().AnnotateTLSDescriptorSequence(SRE); + getTargetStreamer().annotateTLSDescriptorSequence(SRE); return false; } diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp index 4bdaff359646..f16c82ac8b74 100644 --- a/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp +++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp @@ -98,7 +98,7 @@ class ARMTargetAsmStreamer : public ARMTargetStreamer { void emitInst(uint32_t Inst, char Suffix = '\0') override; void finishAttributeSection() override; - void AnnotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE) override; + void annotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE) override; void emitThumbSet(MCSymbol *Symbol, const MCExpr *Value) override; void emitARMWinCFIAllocStack(unsigned Size, bool Wide) override; @@ -250,8 +250,8 @@ void ARMTargetAsmStreamer::emitFPU(unsigned FPU) { void ARMTargetAsmStreamer::finishAttributeSection() {} -void -ARMTargetAsmStreamer::AnnotateTLSDescriptorSequence(const MCSymbolRefExpr *S) { +void ARMTargetAsmStreamer::annotateTLSDescriptorSequence( + const MCSymbolRefExpr *S) { OS << "\t.tlsdescseq\t" << S->getSymbol().getName() << "\n"; } @@ -415,7 +415,7 @@ private: void finishAttributeSection() override; void emitLabel(MCSymbol *Symbol) override; - void AnnotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE) override; + void annotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE) override; void emitThumbSet(MCSymbol *Symbol, const MCExpr *Value) override; // Reset state between object emissions @@ -1090,8 +1090,8 @@ void ARMTargetELFStreamer::emitLabel(MCSymbol *Symbol) { Streamer.emitThumbFunc(Symbol); } -void -ARMTargetELFStreamer::AnnotateTLSDescriptorSequence(const MCSymbolRefExpr *S) { +void ARMTargetELFStreamer::annotateTLSDescriptorSequence( + const MCSymbolRefExpr *S) { getStreamer().EmitFixup(S, FK_Data_4); } diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp index 368829f2bb9f..16d1ae62053e 100644 --- a/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp +++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp @@ -114,8 +114,8 @@ void ARMTargetStreamer::emitArchExtension(uint64_t ArchExt) {} void ARMTargetStreamer::emitObjectArch(ARM::ArchKind Arch) {} void ARMTargetStreamer::emitFPU(unsigned FPU) {} void ARMTargetStreamer::finishAttributeSection() {} -void -ARMTargetStreamer::AnnotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE) {} +void ARMTargetStreamer::annotateTLSDescriptorSequence( + const MCSymbolRefExpr *SRE) {} void ARMTargetStreamer::emitThumbSet(MCSymbol *Symbol, const MCExpr *Value) {} void ARMTargetStreamer::emitARMWinCFIAllocStack(unsigned Size, bool Wide) {} diff --git a/llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp b/llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp index 15eba89eeb55..f364fd3ce851 100644 --- a/llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp +++ b/llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp @@ -681,7 +681,7 @@ bool HexagonAsmParser::ParseDirectiveSubsection(SMLoc L) { Subsection = HexagonMCExpr::create( MCConstantExpr::create(8192 + Res, getContext()), getContext()); - getStreamer().SubSection(Subsection); + getStreamer().subSection(Subsection); return false; } @@ -1450,7 +1450,7 @@ int HexagonAsmParser::processInstruction(MCInst &Inst, MCOperand &MO_0 = Inst.getOperand(0); // push section onto section stack - MES->PushSection(); + MES->pushSection(); std::string myCharStr; MCSectionELF *mySection; @@ -1526,7 +1526,7 @@ int HexagonAsmParser::processInstruction(MCInst &Inst, } else llvm_unreachable("unexpected type of machine operand!"); - MES->PopSection(); + MES->popSection(); if (Sym) { MCInst TmpInst; diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp index befa883d5877..e6975f46c672 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp @@ -24,7 +24,7 @@ void MipsRegInfoRecord::EmitMipsOptionRecord() { MipsTargetStreamer *MTS = static_cast(Streamer->getTargetStreamer()); - Streamer->PushSection(); + Streamer->pushSection(); // We need to distinguish between N64 and the rest because at the moment // we don't emit .Mips.options for other ELFs other than N64. @@ -67,7 +67,7 @@ void MipsRegInfoRecord::EmitMipsOptionRecord() { Streamer->emitInt32(ri_gp_value); } - Streamer->PopSection(); + Streamer->popSection(); } void MipsRegInfoRecord::SetPhysRegUsed(unsigned Reg, diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp index beb9325291c4..0ae759f00325 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp @@ -1026,7 +1026,7 @@ void MipsTargetELFStreamer::emitDirectiveEnd(StringRef Name) { MCA.registerSection(*Sec); Sec->setAlignment(Align(4)); - OS.PushSection(); + OS.pushSection(); OS.SwitchSection(Sec); @@ -1046,7 +1046,7 @@ void MipsTargetELFStreamer::emitDirectiveEnd(StringRef Name) { // the information gathered up until this point. GPRInfoSet = FPRInfoSet = FrameInfoSet = false; - OS.PopSection(); + OS.popSection(); // .end also implicitly sets the size. MCSymbol *CurPCSym = Context.createTempSymbol(); diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp index 4bd8845e9cb9..431c40496a0a 100644 --- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp +++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp @@ -841,12 +841,12 @@ void MipsAsmPrinter::emitInlineAsmStart() const { TS.emitDirectiveSetAt(); TS.emitDirectiveSetMacro(); TS.emitDirectiveSetReorder(); - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); } void MipsAsmPrinter::emitInlineAsmEnd(const MCSubtargetInfo &StartInfo, const MCSubtargetInfo *EndInfo) const { - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); getTargetStreamer().emitDirectiveSetPop(); } @@ -1038,7 +1038,7 @@ void MipsAsmPrinter::EmitFPCallStub( // // probably not necessary but we save and restore the current section state // - OutStreamer->PushSection(); + OutStreamer->pushSection(); // // .section mips16.call.fpxxxx,"ax",@progbits // @@ -1114,7 +1114,7 @@ void MipsAsmPrinter::EmitFPCallStub( const MCExpr *T_min_E = MCBinaryExpr::createSub(T, E, OutContext); OutStreamer->emitELFSize(Stub, T_min_E); TS.emitDirectiveEnd(x); - OutStreamer->PopSection(); + OutStreamer->popSection(); } void MipsAsmPrinter::emitEndOfAsmFile(Module &M) { diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp index ca26879ca3be..3ebfa40df0e2 100644 --- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp @@ -512,7 +512,7 @@ void NVPTXAsmPrinter::emitImplicitDef(const MachineInstr *MI) const { OutStreamer->AddComment(Twine("implicit-def: ") + STI.getRegisterInfo()->getName(RegNo)); } - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); } void NVPTXAsmPrinter::emitKernelFunctionDirectives(const Function &F, diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp index b92b0fc342ec..b0c0023000c7 100644 --- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp +++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp @@ -77,7 +77,7 @@ void PPCELFStreamer::emitPrefixedInstruction(const MCInst &Inst, // label to the top of the fragment containing the aligned instruction that // was just added. if (InstLine == LabelLine) { - AssignFragment(LastLabel, InstructionFragment); + assignFragment(LastLabel, InstructionFragment); LastLabel->setOffset(0); } } diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index ff313a125bc4..4bc1cbf98c74 100644 --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -882,7 +882,7 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) { // Print MO for better readability if (isVerbose()) - OutStreamer->GetCommentOS() << MO << '\n'; + OutStreamer->getCommentOS() << MO << '\n'; EmitToStreamer(*OutStreamer, TmpInst); return; } @@ -953,7 +953,7 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) { // Print MO for better readability if (isVerbose() && IsAIX) - OutStreamer->GetCommentOS() << MO << '\n'; + OutStreamer->getCommentOS() << MO << '\n'; EmitToStreamer(*OutStreamer, TmpInst); return; } @@ -2390,9 +2390,9 @@ void PPCAIXAsmPrinter::emitGlobalVariableHelper(const GlobalVariable *GV) { // Print GV in verbose mode if (isVerbose()) { if (GV->hasInitializer()) { - GV->printAsOperand(OutStreamer->GetCommentOS(), + GV->printAsOperand(OutStreamer->getCommentOS(), /*PrintType=*/false, GV->getParent()); - OutStreamer->GetCommentOS() << '\n'; + OutStreamer->getCommentOS() << '\n'; } } diff --git a/llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp b/llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp index 04527da695ac..0de232651377 100644 --- a/llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp +++ b/llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp @@ -105,7 +105,7 @@ void SPIRVAsmPrinter::emitFunctionHeader() { const Function &F = MF->getFunction(); if (isVerbose()) { - OutStreamer->GetCommentOS() + OutStreamer->getCommentOS() << "-- Begin function " << GlobalValue::dropLLVMManglingEscape(F.getName()) << '\n'; } diff --git a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp index 123cff7f0f15..2dac79c566ea 100644 --- a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp +++ b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp @@ -641,11 +641,11 @@ void SystemZAsmPrinter::LowerFENTRY_CALL(const MachineInstr &MI, MCContext &Ctx = MF->getContext(); if (MF->getFunction().hasFnAttribute("mrecord-mcount")) { MCSymbol *DotSym = OutContext.createTempSymbol(); - OutStreamer->PushSection(); + OutStreamer->pushSection(); OutStreamer->SwitchSection( Ctx.getELFSection("__mcount_loc", ELF::SHT_PROGBITS, ELF::SHF_ALLOC)); OutStreamer->emitSymbolValue(DotSym, 8); - OutStreamer->PopSection(); + OutStreamer->popSection(); OutStreamer->emitLabel(DotSym); } @@ -826,10 +826,10 @@ void SystemZAsmPrinter::emitFunctionBodyEnd() { MCSymbol *FnEndSym = createTempSymbol("func_end"); OutStreamer->emitLabel(FnEndSym); - OutStreamer->PushSection(); + OutStreamer->pushSection(); OutStreamer->SwitchSection(getObjFileLowering().getPPA1Section()); emitPPA1(FnEndSym); - OutStreamer->PopSection(); + OutStreamer->popSection(); CurrentFnPPA1Sym = nullptr; CurrentFnEPMarkerSym = nullptr; diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp index ef8e393fc8ea..7276bf4a73ed 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp @@ -203,7 +203,7 @@ void WebAssemblyAsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { OutStreamer->emitLabel(Sym); // TODO: Actually emit the initializer value. Otherwise the global has the // default value for its type (0, ref.null, etc). - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); } } @@ -426,13 +426,13 @@ void WebAssemblyAsmPrinter::emitEndOfAsmFile(Module &M) { if (!Name || !Contents) continue; - OutStreamer->PushSection(); + OutStreamer->pushSection(); std::string SectionName = (".custom_section." + Name->getString()).str(); MCSectionWasm *MySection = OutContext.getWasmSection(SectionName, SectionKind::getMetadata()); OutStreamer->SwitchSection(MySection); OutStreamer->emitBytes(Contents->getString()); - OutStreamer->PopSection(); + OutStreamer->popSection(); } } @@ -470,7 +470,7 @@ void WebAssemblyAsmPrinter::EmitProducerInfo(Module &M) { if (FieldCount != 0) { MCSectionWasm *Producers = OutContext.getWasmSection( ".custom_section.producers", SectionKind::getMetadata()); - OutStreamer->PushSection(); + OutStreamer->pushSection(); OutStreamer->SwitchSection(Producers); OutStreamer->emitULEB128IntValue(FieldCount); for (auto &Producers : {std::make_pair("language", &Languages), @@ -487,7 +487,7 @@ void WebAssemblyAsmPrinter::EmitProducerInfo(Module &M) { OutStreamer->emitBytes(Producer.second); } } - OutStreamer->PopSection(); + OutStreamer->popSection(); } } @@ -543,7 +543,7 @@ void WebAssemblyAsmPrinter::EmitTargetFeatures(Module &M) { // Emit features and linkage policies into the "target_features" section MCSectionWasm *FeaturesSection = OutContext.getWasmSection( ".custom_section.target_features", SectionKind::getMetadata()); - OutStreamer->PushSection(); + OutStreamer->pushSection(); OutStreamer->SwitchSection(FeaturesSection); OutStreamer->emitULEB128IntValue(EmittedFeatures.size()); @@ -553,7 +553,7 @@ void WebAssemblyAsmPrinter::EmitTargetFeatures(Module &M) { OutStreamer->emitBytes(F.Name); } - OutStreamer->PopSection(); + OutStreamer->popSection(); } void WebAssemblyAsmPrinter::emitConstantPool() { @@ -627,7 +627,7 @@ void WebAssemblyAsmPrinter::emitInstruction(const MachineInstr *MI) { // function body. if (isVerbose()) { OutStreamer->AddComment("fallthrough-return"); - OutStreamer->AddBlankLine(); + OutStreamer->addBlankLine(); } break; } diff --git a/llvm/lib/Target/X86/X86AsmPrinter.cpp b/llvm/lib/Target/X86/X86AsmPrinter.cpp index 6b5d7a443627..31a10ed0fdec 100644 --- a/llvm/lib/Target/X86/X86AsmPrinter.cpp +++ b/llvm/lib/Target/X86/X86AsmPrinter.cpp @@ -70,12 +70,12 @@ bool X86AsmPrinter::runOnMachineFunction(MachineFunction &MF) { if (Subtarget->isTargetCOFF()) { bool Local = MF.getFunction().hasLocalLinkage(); - OutStreamer->BeginCOFFSymbolDef(CurrentFnSym); + OutStreamer->beginCOFFSymbolDef(CurrentFnSym); OutStreamer->emitCOFFSymbolStorageClass( Local ? COFF::IMAGE_SYM_CLASS_STATIC : COFF::IMAGE_SYM_CLASS_EXTERNAL); OutStreamer->emitCOFFSymbolType(COFF::IMAGE_SYM_DTYPE_FUNCTION << COFF::SCT_COMPLEX_TYPE_SHIFT); - OutStreamer->EndCOFFSymbolDef(); + OutStreamer->endCOFFSymbolDef(); } // Emit the rest of the function body. @@ -709,10 +709,10 @@ void X86AsmPrinter::emitStartOfAsmFile(Module &M) { // Emit an absolute @feat.00 symbol. This appears to be some kind of // compiler features bitfield read by link.exe. MCSymbol *S = MMI->getContext().getOrCreateSymbol(StringRef("@feat.00")); - OutStreamer->BeginCOFFSymbolDef(S); + OutStreamer->beginCOFFSymbolDef(S); OutStreamer->emitCOFFSymbolStorageClass(COFF::IMAGE_SYM_CLASS_STATIC); OutStreamer->emitCOFFSymbolType(COFF::IMAGE_SYM_DTYPE_NULL); - OutStreamer->EndCOFFSymbolDef(); + OutStreamer->endCOFFSymbolDef(); int64_t Feat00Flags = 0; if (TT.getArch() == Triple::x86) { @@ -787,7 +787,7 @@ static void emitNonLazyStubs(MachineModuleInfo *MMI, MCStreamer &OutStreamer) { emitNonLazySymbolPointer(OutStreamer, Stub.first, Stub.second); Stubs.clear(); - OutStreamer.AddBlankLine(); + OutStreamer.addBlankLine(); } } diff --git a/llvm/tools/llvm-dwp/llvm-dwp.cpp b/llvm/tools/llvm-dwp/llvm-dwp.cpp index ab7145c72333..d2d162d648c0 100644 --- a/llvm/tools/llvm-dwp/llvm-dwp.cpp +++ b/llvm/tools/llvm-dwp/llvm-dwp.cpp @@ -196,7 +196,7 @@ int main(int argc, char **argv) { return 1; } - MS->Finish(); + MS->finish(); OutFile.keep(); return 0; } diff --git a/llvm/tools/llvm-mca/CodeRegionGenerator.cpp b/llvm/tools/llvm-mca/CodeRegionGenerator.cpp index 0227f0feaeaf..cb8e1822ee30 100644 --- a/llvm/tools/llvm-mca/CodeRegionGenerator.cpp +++ b/llvm/tools/llvm-mca/CodeRegionGenerator.cpp @@ -63,10 +63,10 @@ public: uint64_t Size = 0, unsigned ByteAlignment = 0, SMLoc Loc = SMLoc()) override {} void emitGPRel32Value(const MCExpr *Value) override {} - void BeginCOFFSymbolDef(const MCSymbol *Symbol) override {} + void beginCOFFSymbolDef(const MCSymbol *Symbol) override {} void emitCOFFSymbolStorageClass(int StorageClass) override {} void emitCOFFSymbolType(int Type) override {} - void EndCOFFSymbolDef() override {} + void endCOFFSymbolDef() override {} ArrayRef GetInstructionSequence(unsigned Index) const { return Regions.getInstructionSequence(Index); diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp index 0013a2561bad..4f9ca9fb0d98 100644 --- a/llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp @@ -141,7 +141,7 @@ SmallString<0> DWARFExpressionCopyBytesTest::emitObjFile(StringRef ExprBytes) { C.Streamer->emitCFIEscape(Str); C.Streamer->emitNops(4, 1, SMLoc(), *STI); C.Streamer->emitCFIEndProc(); - C.Streamer->Finish(); + C.Streamer->finish(); return Storage; } diff --git a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp index 42526e5d0c41..c40aa22ed4a7 100644 --- a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp @@ -544,7 +544,7 @@ StringRef dwarfgen::Generator::generate() { for (auto < : LineTables) LT->generate(*MC, *Asm); - MS->Finish(); + MS->finish(); if (FileBytes.empty()) return StringRef(); return StringRef(FileBytes.data(), FileBytes.size()); diff --git a/llvm/unittests/MC/DwarfLineTableHeaders.cpp b/llvm/unittests/MC/DwarfLineTableHeaders.cpp index b68593531943..00398cf5f331 100644 --- a/llvm/unittests/MC/DwarfLineTableHeaders.cpp +++ b/llvm/unittests/MC/DwarfLineTableHeaders.cpp @@ -208,7 +208,7 @@ TEST_F(DwarfLineTableHeaders, TestDWARF4HeaderEmission) { constexpr uint8_t DwarfVersion = 4; C.Ctx->setDwarfVersion(DwarfVersion); emitDebugLineSection(C); - C.Streamer->Finish(); + C.Streamer->finish(); readAndCheckDebugContents( EmittedBinContents.str(), {/* Total length=*/0x30, 0, 0, 0, @@ -232,7 +232,7 @@ TEST_F(DwarfLineTableHeaders, TestDWARF5HeaderEmission) { constexpr uint8_t DwarfVersion = 5; C.Ctx->setDwarfVersion(DwarfVersion); emitDebugLineSection(C); - C.Streamer->Finish(); + C.Streamer->finish(); readAndCheckDebugContents( EmittedBinContents.str(), {/* Total length=*/0x43, 0, 0, 0,