[MC] De-capitalize MCStreamer functions

Follow-up to c031378ce0 .
The class is mostly consistent now.
This commit is contained in:
Fangrui Song 2022-06-07 00:31:02 -07:00
parent 411bd2d407
commit 15d82c62dc
52 changed files with 200 additions and 202 deletions

View File

@ -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();
}
}

View File

@ -494,7 +494,7 @@ void MachORewriteInstance::emitAndLink() {
auto Streamer = BC->createStreamer(*OS);
emitBinaryContext(*Streamer, *BC, getOrgSecPrefix());
Streamer->Finish();
Streamer->finish();
std::unique_ptr<MemoryBuffer> ObjectMemBuffer =
MemoryBuffer::getMemBuffer(BOS->str(), "in-memory object file", false);

View File

@ -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);

View File

@ -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<const MCSymbol *, unsigned> SymbolOrdering;
/// This is stack of current and previous section values saved by
/// PushSection.
/// pushSection.
SmallVector<std::pair<MCSectionSubPair, MCSectionSubPair>, 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; }

View File

@ -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;

View File

@ -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<unsigned>::const_iterator

View File

@ -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<IntegerType>(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';
}
}

View File

@ -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");

View File

@ -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:

View File

@ -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)

View File

@ -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<unsigned>::const_iterator

View File

@ -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) {

View File

@ -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.

View File

@ -732,7 +732,7 @@ void StackMaps::serializeToStackMapSection() {
emitFunctionFrameRecords(OS);
emitConstantPoolEntries(OS);
emitCallsiteEntries(OS);
OS.AddBlankLine();
OS.addBlankLine();
// Clean up.
CSInfos.clear();

View File

@ -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);

View File

@ -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());

View File

@ -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<MCFixup, 4> 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());

View File

@ -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,

View File

@ -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

View File

@ -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 {}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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();
}

View File

@ -108,7 +108,7 @@ void MCStreamer::reset() {
SectionStack.push_back(std::pair<MCSectionSubPair, MCSectionSubPair>());
}
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) {}

View File

@ -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<MCSymbolCOFF>(S);
if (CurSymbol)
Error("starting a new symbol definition without completing the "
@ -172,7 +172,7 @@ void MCWinCOFFStreamer::emitCOFFSymbolType(int Type) {
cast<MCSymbolCOFF>(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<MCSymbolCOFF>(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,

View File

@ -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,

View File

@ -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<AArch64FunctionInfo>();
Optional<std::string> OutlinerString = FI->getOutliningStyle();
if (OutlinerString != None)
OutStreamer->GetCommentOS() << ' ' << OutlinerString;
OutStreamer->getCommentOS() << ' ' << OutlinerString;
}
void AArch64AsmPrinter::LowerPATCHABLE_FUNCTION_ENTER(const MachineInstr &MI)

View File

@ -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() {

View File

@ -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;
}

View File

@ -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

View File

@ -11947,7 +11947,7 @@ bool ARMAsmParser::parseDirectiveTLSDescSeq(SMLoc L) {
if (parseEOL())
return true;
getTargetStreamer().AnnotateTLSDescriptorSequence(SRE);
getTargetStreamer().annotateTLSDescriptorSequence(SRE);
return false;
}

View File

@ -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);
}

View File

@ -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) {}

View File

@ -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;

View File

@ -24,7 +24,7 @@ void MipsRegInfoRecord::EmitMipsOptionRecord() {
MipsTargetStreamer *MTS =
static_cast<MipsTargetStreamer *>(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,

View File

@ -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();

View File

@ -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) {

View File

@ -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,

View File

@ -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);
}
}

View File

@ -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';
}
}

View File

@ -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';
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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();
}
}

View File

@ -196,7 +196,7 @@ int main(int argc, char **argv) {
return 1;
}
MS->Finish();
MS->finish();
OutFile.keep();
return 0;
}

View File

@ -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<MCInst> GetInstructionSequence(unsigned Index) const {
return Regions.getInstructionSequence(Index);

View File

@ -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;
}

View File

@ -544,7 +544,7 @@ StringRef dwarfgen::Generator::generate() {
for (auto &LT : LineTables)
LT->generate(*MC, *Asm);
MS->Finish();
MS->finish();
if (FileBytes.empty())
return StringRef();
return StringRef(FileBytes.data(), FileBytes.size());

View File

@ -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,