[MC] De-capitalize MCStreamer::Emit{Bundle,Addrsig}* etc

So far, all non-COFF-related Emit* functions have been de-capitalized.
This commit is contained in:
Fangrui Song 2020-02-15 08:52:56 -08:00
parent ce2b5f1569
commit 549b436beb
33 changed files with 162 additions and 164 deletions

View File

@ -498,7 +498,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
MCSection *AsmLabel = Ctx.getMachOSection(
"__LLVM", "__asm", MachO::S_REGULAR, 4, SectionKind::getReadOnly());
Str.get()->SwitchSection(AsmLabel);
Str.get()->EmitZeros(1);
Str.get()->emitZeros(1);
}
// Assembly to object compilation should leverage assembly info.

View File

@ -61,12 +61,12 @@ public:
void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
uint64_t Size = 0, unsigned ByteAlignment = 0,
SMLoc L = SMLoc()) override;
void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment = 0) override;
void emitValueImpl(const MCExpr *Value, unsigned Size,
SMLoc Loc = SMLoc()) override;
void EmitIdent(StringRef IdentString) override;
void emitIdent(StringRef IdentString) override;
void emitValueToAlignment(unsigned, int64_t, unsigned, unsigned) override;
@ -75,9 +75,9 @@ public:
void FinishImpl() override;
void EmitBundleAlignMode(unsigned AlignPow2) override;
void EmitBundleLock(bool AlignToEnd) override;
void EmitBundleUnlock() override;
void emitBundleAlignMode(unsigned AlignPow2) override;
void emitBundleLock(bool AlignToEnd) override;
void emitBundleUnlock() override;
private:
bool isBundleLocked() const;

View File

@ -129,9 +129,9 @@ public:
/// can change its size during relaxation.
virtual void EmitInstToFragment(const MCInst &Inst, const MCSubtargetInfo &);
void EmitBundleAlignMode(unsigned AlignPow2) override;
void EmitBundleLock(bool AlignToEnd) override;
void EmitBundleUnlock() override;
void emitBundleAlignMode(unsigned AlignPow2) override;
void emitBundleLock(bool AlignToEnd) override;
void emitBundleUnlock() override;
void emitBytes(StringRef Data) override;
void emitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
unsigned ValueSize = 1,
@ -170,7 +170,7 @@ public:
void emitTPRel64Value(const MCExpr *Value) override;
void emitGPRel32Value(const MCExpr *Value) override;
void emitGPRel64Value(const MCExpr *Value) override;
bool EmitRelocDirective(const MCExpr &Offset, StringRef Name,
bool emitRelocDirective(const MCExpr &Offset, StringRef Name,
const MCExpr *Expr, SMLoc Loc,
const MCSubtargetInfo &STI) override;
using MCStreamer::emitFill;
@ -178,10 +178,10 @@ public:
SMLoc Loc = SMLoc()) override;
void emitFill(const MCExpr &NumValues, int64_t Size, int64_t Expr,
SMLoc Loc = SMLoc()) override;
void EmitFileDirective(StringRef Filename) override;
void emitFileDirective(StringRef Filename) override;
void EmitAddrsig() override;
void EmitAddrsigSym(const MCSymbol *Sym) override;
void emitAddrsig() override;
void emitAddrsigSym(const MCSymbol *Sym) override;
void FinishImpl() override;

View File

@ -242,7 +242,7 @@ protected:
virtual void EmitWindowsUnwindTables();
virtual void EmitRawTextImpl(StringRef String);
virtual void emitRawTextImpl(StringRef String);
/// Returns true if the the .cv_loc directive is in the right section.
bool checkCVLocSection(unsigned FuncId, unsigned FileNo, SMLoc Loc);
@ -562,7 +562,7 @@ public:
/// \param CsectSym - Csect name for the block of storage.
/// \param ByteAlignment - The alignment of the symbol in bytes. Must be a
/// power of 2.
virtual void EmitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
virtual void emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
MCSymbol *CsectSym,
unsigned ByteAlignment);
@ -620,7 +620,7 @@ public:
/// \param Size - The size of the symbol.
/// \param ByteAlignment - The alignment of the thread local common symbol
/// if non-zero. This must be a power of 2 on some targets.
virtual void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
virtual void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
uint64_t Size, unsigned ByteAlignment = 0);
/// @}
@ -756,7 +756,7 @@ public:
/// Emit NumBytes worth of zeros.
/// This function properly handles data in virtual sections.
void EmitZeros(uint64_t NumBytes);
void emitZeros(uint64_t NumBytes);
/// Emit some number of copies of \p Value until the byte alignment \p
/// ByteAlignment is reached.
@ -813,11 +813,11 @@ public:
/// Switch to a new logical file. This is used to implement the '.file
/// "foo.c"' assembler directive.
virtual void EmitFileDirective(StringRef Filename);
virtual void emitFileDirective(StringRef Filename);
/// Emit the "identifiers" directive. This implements the
/// '.ident "version foo"' assembler directive.
virtual void EmitIdent(StringRef IdentString) {}
virtual void emitIdent(StringRef IdentString) {}
/// Associate a filename with a specified logical file number. This
/// implements the DWARF2 '.file 4 "foo.c"' assembler directive.
@ -995,19 +995,19 @@ public:
/// Get the .xdata section used for the given section.
MCSection *getAssociatedXDataSection(const MCSection *TextSec);
virtual void EmitSyntaxDirective();
virtual void emitSyntaxDirective();
/// Emit a .reloc directive.
/// Returns true if the relocation could not be emitted because Name is not
/// known.
virtual bool EmitRelocDirective(const MCExpr &Offset, StringRef Name,
virtual bool emitRelocDirective(const MCExpr &Offset, StringRef Name,
const MCExpr *Expr, SMLoc Loc,
const MCSubtargetInfo &STI) {
return true;
}
virtual void EmitAddrsig() {}
virtual void EmitAddrsigSym(const MCSymbol *Sym) {}
virtual void emitAddrsig() {}
virtual void emitAddrsigSym(const MCSymbol *Sym) {}
/// Emit the given \p Instruction into the current section.
virtual void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI);
@ -1015,21 +1015,21 @@ public:
/// Set the bundle alignment mode from now on in the section.
/// The argument is the power of 2 to which the alignment is set. The
/// value 0 means turn the bundle alignment off.
virtual void EmitBundleAlignMode(unsigned AlignPow2);
virtual void emitBundleAlignMode(unsigned AlignPow2);
/// The following instructions are a bundle-locked group.
///
/// \param AlignToEnd - If true, the bundle-locked group will be aligned to
/// the end of a bundle.
virtual void EmitBundleLock(bool AlignToEnd);
virtual void emitBundleLock(bool AlignToEnd);
/// Ends a bundle-locked group.
virtual void EmitBundleUnlock();
virtual void emitBundleUnlock();
/// If this file is backed by a assembly streamer, this dumps the
/// specified string in the output .s file. This capability is indicated by
/// the hasRawTextSupport() predicate. By default this aborts.
void EmitRawText(const Twine &String);
void emitRawText(const Twine &String);
/// Streamer specific finalization.
virtual void FinishImpl();

View File

@ -61,12 +61,12 @@ public:
void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
uint64_t Size = 0, unsigned ByteAlignment = 0,
SMLoc Loc = SMLoc()) override;
void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment = 0) override;
void emitValueImpl(const MCExpr *Value, unsigned Size,
SMLoc Loc = SMLoc()) override;
void EmitIdent(StringRef IdentString) override;
void emitIdent(StringRef IdentString) override;
void emitValueToAlignment(unsigned, int64_t, unsigned, unsigned) override;

View File

@ -60,9 +60,9 @@ public:
unsigned ByteAlignment) override;
void emitZerofill(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment, SMLoc Loc = SMLoc()) override;
void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment) override;
void EmitIdent(StringRef IdentString) override;
void emitIdent(StringRef IdentString) override;
void EmitWinEHHandlerData(SMLoc Loc) override;
void FinishImpl() override;

View File

@ -26,7 +26,7 @@ public:
uint64_t Size = 0, unsigned ByteAlignment = 0,
SMLoc Loc = SMLoc()) override;
void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo &) override;
void EmitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
void emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
MCSymbol *CsectSym,
unsigned ByteAlign) override;
};

View File

@ -286,7 +286,7 @@ bool AsmPrinter::doInitialization(Module &M) {
// don't, this at least helps the user find where a global came from.
if (MAI->hasSingleParameterDotFile()) {
// .file "foo.c"
OutStreamer->EmitFileDirective(
OutStreamer->emitFileDirective(
llvm::sys::path::filename(M.getSourceFileName()));
}
@ -603,7 +603,7 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
if (GVKind.isThreadBSS()) {
TheSection = getObjFileLowering().getTLSBSSSection();
OutStreamer->EmitTBSSSymbol(TheSection, MangSym, Size, Alignment.value());
OutStreamer->emitTBSSSymbol(TheSection, MangSym, Size, Alignment.value());
} else if (GVKind.isThreadData()) {
OutStreamer->SwitchSection(TheSection);
@ -1654,12 +1654,12 @@ bool AsmPrinter::doFinalization(Module &M) {
if (TM.Options.EmitAddrsig) {
// Emit address-significance attributes for all globals.
OutStreamer->EmitAddrsig();
OutStreamer->emitAddrsig();
for (const GlobalValue &GV : M.global_values())
if (!GV.use_empty() && !GV.isThreadLocal() &&
!GV.hasDLLImportStorageClass() && !GV.getName().startswith("llvm.") &&
!GV.hasAtLeastLocalUnnamedAddr())
OutStreamer->EmitAddrsigSym(getSymbol(&GV));
OutStreamer->emitAddrsigSym(getSymbol(&GV));
}
// Emit symbol partition specifications (ELF only).
@ -1674,7 +1674,7 @@ bool AsmPrinter::doFinalization(Module &M) {
OutContext.getELFSection(".llvm_sympart", ELF::SHT_LLVM_SYMPART, 0, 0,
"", ++UniqueID, nullptr));
OutStreamer->emitBytes(GV.getPartition());
OutStreamer->EmitZeros(1);
OutStreamer->emitZeros(1);
OutStreamer->emitValue(
MCSymbolRefExpr::create(getSymbol(&GV), OutContext),
MAI->getCodePointerSize());
@ -1834,7 +1834,7 @@ void AsmPrinter::emitConstantPool() {
// Emit inter-object padding for alignment.
unsigned AlignMask = CPE.getAlignment() - 1;
unsigned NewOffset = (Offset + AlignMask) & ~AlignMask;
OutStreamer->EmitZeros(NewOffset - Offset);
OutStreamer->emitZeros(NewOffset - Offset);
Type *Ty = CPE.getType();
Offset = NewOffset + getDataLayout().getTypeAllocSize(Ty);
@ -2128,7 +2128,7 @@ void AsmPrinter::emitModuleIdents(Module &M) {
assert(N->getNumOperands() == 1 &&
"llvm.ident metadata entry can have only one operand");
const MDString *S = cast<MDString>(N->getOperand(0));
OutStreamer->EmitIdent(S->getString());
OutStreamer->emitIdent(S->getString());
}
}
}
@ -2144,14 +2144,14 @@ void AsmPrinter::emitModuleCommandLines(Module &M) {
OutStreamer->PushSection();
OutStreamer->SwitchSection(CommandLine);
OutStreamer->EmitZeros(1);
OutStreamer->emitZeros(1);
for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) {
const MDNode *N = NMD->getOperand(i);
assert(N->getNumOperands() == 1 &&
"llvm.commandline metadata entry can have only one operand");
const MDString *S = cast<MDString>(N->getOperand(0));
OutStreamer->emitBytes(S->getString());
OutStreamer->EmitZeros(1);
OutStreamer->emitZeros(1);
}
OutStreamer->PopSection();
}
@ -2198,7 +2198,7 @@ void AsmPrinter::emitLabelPlusOffset(const MCSymbol *Label, uint64_t Offset,
if (MAI->needsDwarfSectionOffsetDirective() && IsSectionRelative) {
OutStreamer->EmitCOFFSecRel32(Label, Offset);
if (Size > 4)
OutStreamer->EmitZeros(Size - 4);
OutStreamer->emitZeros(Size - 4);
return;
}
@ -2480,7 +2480,7 @@ static void emitGlobalConstantDataSequential(const DataLayout &DL,
CDS->getNumElements();
assert(EmittedSize <= Size && "Size cannot be less than EmittedSize!");
if (unsigned Padding = Size - EmittedSize)
AP.OutStreamer->EmitZeros(Padding);
AP.OutStreamer->emitZeros(Padding);
}
static void emitGlobalConstantArray(const DataLayout &DL,
@ -2511,7 +2511,7 @@ static void emitGlobalConstantVector(const DataLayout &DL,
unsigned EmittedSize = DL.getTypeAllocSize(CV->getType()->getElementType()) *
CV->getType()->getNumElements();
if (unsigned Padding = Size - EmittedSize)
AP.OutStreamer->EmitZeros(Padding);
AP.OutStreamer->emitZeros(Padding);
}
static void emitGlobalConstantStruct(const DataLayout &DL,
@ -2536,7 +2536,7 @@ static void emitGlobalConstantStruct(const DataLayout &DL,
// Insert padding - this may include padding to increase the size of the
// current field up to the ABI size (if the struct is not packed) as well
// as padding to ensure that the next field starts at the right offset.
AP.OutStreamer->EmitZeros(PadSize);
AP.OutStreamer->emitZeros(PadSize);
}
assert(SizeSoFar == Layout->getSizeInBytes() &&
"Layout of constant struct may be incorrect!");
@ -2583,7 +2583,7 @@ static void emitGlobalConstantFP(APFloat APF, Type *ET, AsmPrinter &AP) {
// Emit the tail padding for the long double.
const DataLayout &DL = AP.getDataLayout();
AP.OutStreamer->EmitZeros(DL.getTypeAllocSize(ET) - DL.getTypeStoreSize(ET));
AP.OutStreamer->emitZeros(DL.getTypeAllocSize(ET) - DL.getTypeStoreSize(ET));
}
static void emitGlobalConstantFP(const ConstantFP *CFP, AsmPrinter &AP) {
@ -2749,7 +2749,7 @@ static void emitGlobalConstantImpl(const DataLayout &DL, const Constant *CV,
BaseCV = dyn_cast<Constant>(CV->user_back());
if (isa<ConstantAggregateZero>(CV) || isa<UndefValue>(CV))
return AP.OutStreamer->EmitZeros(Size);
return AP.OutStreamer->emitZeros(Size);
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
switch (Size) {
@ -3173,7 +3173,7 @@ void AsmPrinter::XRayFunctionEntry::emit(int Bytes, MCStreamer *Out,
Out->emitBinaryData(StringRef(reinterpret_cast<const char *>(&Version), 1));
auto Padding = (4 * Bytes) - ((2 * Bytes) + 3);
assert(Padding >= 0 && "Instrumentation map entry > 4 * Word Size");
Out->EmitZeros(Padding);
Out->emitZeros(Padding);
}
void AsmPrinter::emitXRayTable() {

View File

@ -127,7 +127,7 @@ void AsmPrinter::emitInlineAsm(StringRef Str, const MCSubtargetInfo &STI,
if (!MCAI->useIntegratedAssembler() &&
!OutStreamer->isIntegratedAssemblerRequired()) {
emitInlineAsmStart();
OutStreamer->EmitRawText(Str);
OutStreamer->emitRawText(Str);
emitInlineAsmEnd(STI, nullptr);
return;
}

View File

@ -95,7 +95,7 @@ public:
EmitCommentsAndEOL();
}
void EmitSyntaxDirective() override;
void emitSyntaxDirective() override;
void EmitCommentsAndEOL();
@ -166,7 +166,7 @@ public:
void EmitCOFFSectionIndex(MCSymbol const *Symbol) override;
void EmitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset) override;
void EmitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset) override;
void EmitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
void emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
MCSymbol *CsectSym,
unsigned ByteAlign) override;
void emitELFSize(MCSymbol *Symbol, const MCExpr *Value) override;
@ -185,7 +185,7 @@ public:
uint64_t Size = 0, unsigned ByteAlignment = 0,
SMLoc Loc = SMLoc()) override;
void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment = 0) override;
void emitBinaryData(StringRef Data) override;
@ -228,7 +228,7 @@ public:
unsigned char Value,
SMLoc Loc) override;
void EmitFileDirective(StringRef Filename) override;
void emitFileDirective(StringRef Filename) override;
Expected<unsigned> tryEmitDwarfFileDirective(unsigned FileNo,
StringRef Directory,
StringRef Filename,
@ -287,7 +287,7 @@ public:
void EmitCVFileChecksumOffsetDirective(unsigned FileNo) override;
void EmitCVFPOData(const MCSymbol *ProcSym, SMLoc L) override;
void EmitIdent(StringRef IdentString) override;
void emitIdent(StringRef IdentString) override;
void emitCFIBKeyFrame() override;
void emitCFISections(bool EH, bool Debug) override;
void emitCFIDefCfa(int64_t Register, int64_t Offset) override;
@ -336,21 +336,21 @@ public:
void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override;
void EmitBundleAlignMode(unsigned AlignPow2) override;
void EmitBundleLock(bool AlignToEnd) override;
void EmitBundleUnlock() override;
void emitBundleAlignMode(unsigned AlignPow2) override;
void emitBundleLock(bool AlignToEnd) override;
void emitBundleUnlock() override;
bool EmitRelocDirective(const MCExpr &Offset, StringRef Name,
bool emitRelocDirective(const MCExpr &Offset, StringRef Name,
const MCExpr *Expr, SMLoc Loc,
const MCSubtargetInfo &STI) override;
void EmitAddrsig() override;
void EmitAddrsigSym(const MCSymbol *Sym) override;
void emitAddrsig() override;
void emitAddrsigSym(const MCSymbol *Sym) override;
/// If this file is backed by an assembly streamer, this dumps the specified
/// string in the output .s file. This capability is indicated by the
/// hasRawTextSupport() predicate.
void EmitRawTextImpl(StringRef String) override;
void emitRawTextImpl(StringRef String) override;
void FinishImpl() override;
};
@ -698,7 +698,7 @@ void MCAsmStreamer::emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {
EmitEOL();
}
void MCAsmStreamer::EmitSyntaxDirective() {
void MCAsmStreamer::emitSyntaxDirective() {
if (MAI->getAssemblerDialect() == 1) {
OS << "\t.intel_syntax noprefix";
EmitEOL();
@ -769,7 +769,7 @@ void MCAsmStreamer::EmitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset) {
// We need an XCOFF-specific version of this directive as the AIX syntax
// requires a QualName argument identifying the csect name and storage mapping
// class to appear before the alignment if we are specifying it.
void MCAsmStreamer::EmitXCOFFLocalCommonSymbol(MCSymbol *LabelSym,
void MCAsmStreamer::emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym,
uint64_t Size,
MCSymbol *CsectSym,
unsigned ByteAlignment) {
@ -861,7 +861,7 @@ void MCAsmStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol,
// .tbss sym, size, align
// This depends that the symbol has already been mangled from the original,
// e.g. _a.
void MCAsmStreamer::EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
void MCAsmStreamer::emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
uint64_t Size, unsigned ByteAlignment) {
AssignFragment(Symbol, &Section->getDummyFragment());
@ -1220,7 +1220,7 @@ void MCAsmStreamer::emitValueToOffset(const MCExpr *Offset,
EmitEOL();
}
void MCAsmStreamer::EmitFileDirective(StringRef Filename) {
void MCAsmStreamer::emitFileDirective(StringRef Filename) {
assert(MAI->hasSingleParameterDotFile());
OS << "\t.file\t";
PrintQuotedString(Filename, OS);
@ -1284,7 +1284,7 @@ Expected<unsigned> MCAsmStreamer::tryEmitDwarfFileDirective(
if (MCTargetStreamer *TS = getTargetStreamer())
TS->emitDwarfFileDirective(OS1.str());
else
EmitRawText(OS1.str());
emitRawText(OS1.str());
return FileNo;
}
@ -1310,7 +1310,7 @@ void MCAsmStreamer::emitDwarfFile0Directive(StringRef Directory,
if (MCTargetStreamer *TS = getTargetStreamer())
TS->emitDwarfFileDirective(OS1.str());
else
EmitRawText(OS1.str());
emitRawText(OS1.str());
}
void MCAsmStreamer::emitDwarfLocDirective(unsigned FileNo, unsigned Line,
@ -1516,7 +1516,7 @@ void MCAsmStreamer::EmitCVFPOData(const MCSymbol *ProcSym, SMLoc L) {
EmitEOL();
}
void MCAsmStreamer::EmitIdent(StringRef IdentString) {
void MCAsmStreamer::emitIdent(StringRef IdentString) {
assert(MAI->hasIdentDirective() && ".ident directive not supported");
OS << "\t.ident\t";
PrintQuotedString(IdentString, OS);
@ -1973,24 +1973,24 @@ void MCAsmStreamer::emitInstruction(const MCInst &Inst,
EmitEOL();
}
void MCAsmStreamer::EmitBundleAlignMode(unsigned AlignPow2) {
void MCAsmStreamer::emitBundleAlignMode(unsigned AlignPow2) {
OS << "\t.bundle_align_mode " << AlignPow2;
EmitEOL();
}
void MCAsmStreamer::EmitBundleLock(bool AlignToEnd) {
void MCAsmStreamer::emitBundleLock(bool AlignToEnd) {
OS << "\t.bundle_lock";
if (AlignToEnd)
OS << " align_to_end";
EmitEOL();
}
void MCAsmStreamer::EmitBundleUnlock() {
void MCAsmStreamer::emitBundleUnlock() {
OS << "\t.bundle_unlock";
EmitEOL();
}
bool MCAsmStreamer::EmitRelocDirective(const MCExpr &Offset, StringRef Name,
bool MCAsmStreamer::emitRelocDirective(const MCExpr &Offset, StringRef Name,
const MCExpr *Expr, SMLoc,
const MCSubtargetInfo &STI) {
OS << "\t.reloc ";
@ -2004,12 +2004,12 @@ bool MCAsmStreamer::EmitRelocDirective(const MCExpr &Offset, StringRef Name,
return false;
}
void MCAsmStreamer::EmitAddrsig() {
void MCAsmStreamer::emitAddrsig() {
OS << "\t.addrsig";
EmitEOL();
}
void MCAsmStreamer::EmitAddrsigSym(const MCSymbol *Sym) {
void MCAsmStreamer::emitAddrsigSym(const MCSymbol *Sym) {
OS << "\t.addrsig_sym ";
Sym->print(OS, MAI);
EmitEOL();
@ -2018,7 +2018,7 @@ void MCAsmStreamer::EmitAddrsigSym(const MCSymbol *Sym) {
/// EmitRawText - If this file is backed by an assembly streamer, this dumps
/// the specified string in the output .s file. This capability is
/// indicated by the hasRawTextSupport() predicate.
void MCAsmStreamer::EmitRawTextImpl(StringRef String) {
void MCAsmStreamer::emitRawTextImpl(StringRef String) {
if (!String.empty() && String.back() == '\n')
String = String.substr(0, String.size()-1);
OS << String;

View File

@ -306,7 +306,7 @@ void MCELFStreamer::emitCommonSymbol(MCSymbol *S, uint64_t Size,
emitValueToAlignment(ByteAlignment, 0, 1, 0);
emitLabel(Symbol);
EmitZeros(Size);
emitZeros(Size);
SwitchSection(P.first, P.second);
} else {
@ -362,7 +362,7 @@ void MCELFStreamer::emitCGProfileEntry(const MCSymbolRefExpr *From,
getAssembler().CGProfile.push_back({From, To, Count});
}
void MCELFStreamer::EmitIdent(StringRef IdentString) {
void MCELFStreamer::emitIdent(StringRef IdentString) {
MCSection *Comment = getAssembler().getContext().getELFSection(
".comment", ELF::SHT_PROGBITS, ELF::SHF_MERGE | ELF::SHF_STRINGS, 1, "");
PushSection();
@ -600,7 +600,7 @@ void MCELFStreamer::EmitInstToData(const MCInst &Inst,
}
}
void MCELFStreamer::EmitBundleAlignMode(unsigned AlignPow2) {
void MCELFStreamer::emitBundleAlignMode(unsigned AlignPow2) {
assert(AlignPow2 <= 30 && "Invalid bundle alignment");
MCAssembler &Assembler = getAssembler();
if (AlignPow2 > 0 && (Assembler.getBundleAlignSize() == 0 ||
@ -610,7 +610,7 @@ void MCELFStreamer::EmitBundleAlignMode(unsigned AlignPow2) {
report_fatal_error(".bundle_align_mode cannot be changed once set");
}
void MCELFStreamer::EmitBundleLock(bool AlignToEnd) {
void MCELFStreamer::emitBundleLock(bool AlignToEnd) {
MCSection &Sec = *getCurrentSectionOnly();
// Sanity checks
@ -631,7 +631,7 @@ void MCELFStreamer::EmitBundleLock(bool AlignToEnd) {
: MCSection::BundleLocked);
}
void MCELFStreamer::EmitBundleUnlock() {
void MCELFStreamer::emitBundleUnlock() {
MCSection &Sec = *getCurrentSectionOnly();
// Sanity checks
@ -690,7 +690,7 @@ void MCELFStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol,
llvm_unreachable("ELF doesn't support this directive");
}
void MCELFStreamer::EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
void MCELFStreamer::emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
uint64_t Size, unsigned ByteAlignment) {
llvm_unreachable("ELF doesn't support this directive");
}

View File

@ -103,10 +103,10 @@ public:
void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
uint64_t Size = 0, unsigned ByteAlignment = 0,
SMLoc Loc = SMLoc()) override;
void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment = 0) override;
void EmitIdent(StringRef IdentString) override {
void emitIdent(StringRef IdentString) override {
llvm_unreachable("macho doesn't support this directive");
}
@ -440,14 +440,14 @@ void MCMachOStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol,
if (Symbol) {
emitValueToAlignment(ByteAlignment, 0, 1, 0);
emitLabel(Symbol);
EmitZeros(Size);
emitZeros(Size);
}
PopSection();
}
// This should always be called with the thread local bss section. Like the
// .zerofill directive this doesn't actually switch sections on us.
void MCMachOStreamer::EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
void MCMachOStreamer::emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
uint64_t Size, unsigned ByteAlignment) {
emitZerofill(Section, Symbol, Size, ByteAlignment);
}

View File

@ -23,7 +23,7 @@ namespace {
/// @{
bool hasRawTextSupport() const override { return true; }
void EmitRawTextImpl(StringRef String) override {}
void emitRawTextImpl(StringRef String) override {}
bool emitSymbolAttribute(MCSymbol *Symbol,
MCSymbolAttr Attribute) override {

View File

@ -431,15 +431,15 @@ static const char *const BundlingNotImplementedMsg =
"Aligned bundling is not implemented for this object format";
#endif
void MCObjectStreamer::EmitBundleAlignMode(unsigned AlignPow2) {
void MCObjectStreamer::emitBundleAlignMode(unsigned AlignPow2) {
llvm_unreachable(BundlingNotImplementedMsg);
}
void MCObjectStreamer::EmitBundleLock(bool AlignToEnd) {
void MCObjectStreamer::emitBundleLock(bool AlignToEnd) {
llvm_unreachable(BundlingNotImplementedMsg);
}
void MCObjectStreamer::EmitBundleUnlock() {
void MCObjectStreamer::emitBundleUnlock() {
llvm_unreachable(BundlingNotImplementedMsg);
}
@ -660,7 +660,7 @@ void MCObjectStreamer::emitGPRel64Value(const MCExpr *Value) {
DF->getContents().resize(DF->getContents().size() + 8, 0);
}
bool MCObjectStreamer::EmitRelocDirective(const MCExpr &Offset, StringRef Name,
bool MCObjectStreamer::emitRelocDirective(const MCExpr &Offset, StringRef Name,
const MCExpr *Expr, SMLoc Loc,
const MCSubtargetInfo &STI) {
Optional<MCFixupKind> MaybeKind = Assembler->getBackend().getFixupKind(Name);
@ -738,15 +738,15 @@ void MCObjectStreamer::emitFill(const MCExpr &NumValues, int64_t Size,
insert(new MCFillFragment(Expr, Size, NumValues, Loc));
}
void MCObjectStreamer::EmitFileDirective(StringRef Filename) {
void MCObjectStreamer::emitFileDirective(StringRef Filename) {
getAssembler().addFileName(Filename);
}
void MCObjectStreamer::EmitAddrsig() {
void MCObjectStreamer::emitAddrsig() {
getAssembler().getWriter().emitAddrsigSection();
}
void MCObjectStreamer::EmitAddrsigSym(const MCSymbol *Sym) {
void MCObjectStreamer::emitAddrsigSym(const MCSymbol *Sym) {
getAssembler().registerSymbol(*Sym);
getAssembler().getWriter().addAddrsigSymbol(Sym);
}

View File

@ -3029,7 +3029,7 @@ bool AsmParser::parseDirectiveReloc(SMLoc DirectiveLoc) {
const MCTargetAsmParser &MCT = getTargetParser();
const MCSubtargetInfo &STI = MCT.getSTI();
if (getStreamer().EmitRelocDirective(*Offset, Name, Expr, DirectiveLoc, STI))
if (getStreamer().emitRelocDirective(*Offset, Name, Expr, DirectiveLoc, STI))
return Error(NameLoc, "unknown relocation name");
return false;
@ -3419,7 +3419,7 @@ bool AsmParser::parseDirectiveFile(SMLoc DirectiveLoc) {
// numberless .file directives. This allows some portability of assembler
// between different object file formats.
if (getContext().getAsmInfo()->hasSingleParameterDotFile())
getStreamer().EmitFileDirective(Filename);
getStreamer().emitFileDirective(Filename);
} else {
// In case there is a -g option as well as debug info from directive .file,
// we turn off the -g option, directly use the existing debug info instead.
@ -4661,7 +4661,7 @@ bool AsmParser::parseDirectiveBundleAlignMode() {
// Because of AlignSizePow2's verified range we can safely truncate it to
// unsigned.
getStreamer().EmitBundleAlignMode(static_cast<unsigned>(AlignSizePow2));
getStreamer().emitBundleAlignMode(static_cast<unsigned>(AlignSizePow2));
return false;
}
@ -4686,7 +4686,7 @@ bool AsmParser::parseDirectiveBundleLock() {
AlignToEnd = true;
}
getStreamer().EmitBundleLock(AlignToEnd);
getStreamer().emitBundleLock(AlignToEnd);
return false;
}
@ -4698,7 +4698,7 @@ bool AsmParser::parseDirectiveBundleUnlock() {
"unexpected token in '.bundle_unlock' directive"))
return true;
getStreamer().EmitBundleUnlock();
getStreamer().emitBundleUnlock();
return false;
}
@ -5726,7 +5726,7 @@ bool AsmParser::parseDirectivePrint(SMLoc DirectiveLoc) {
}
bool AsmParser::parseDirectiveAddrsig() {
getStreamer().EmitAddrsig();
getStreamer().emitAddrsig();
return false;
}
@ -5736,7 +5736,7 @@ bool AsmParser::parseDirectiveAddrsigSym() {
"expected identifier in '.addrsig_sym' directive"))
return true;
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
getStreamer().EmitAddrsigSym(Sym);
getStreamer().emitAddrsigSym(Sym);
return false;
}

View File

@ -870,10 +870,10 @@ bool DarwinAsmParser::parseDirectiveTBSS(StringRef, SMLoc) {
if (!Sym->isUndefined())
return Error(IDLoc, "invalid symbol redefinition");
getStreamer().EmitTBSSSymbol(getContext().getMachOSection(
"__DATA", "__thread_bss",
MachO::S_THREAD_LOCAL_ZEROFILL,
0, SectionKind::getThreadBSS()),
getStreamer().emitTBSSSymbol(
getContext().getMachOSection("__DATA", "__thread_bss",
MachO::S_THREAD_LOCAL_ZEROFILL, 0,
SectionKind::getThreadBSS()),
Sym, Size, 1 << Pow2Alignment);
return false;

View File

@ -748,7 +748,7 @@ bool ELFAsmParser::ParseDirectiveIdent(StringRef, SMLoc) {
return TokError("unexpected token in '.ident' directive");
Lex();
getStreamer().EmitIdent(Data);
getStreamer().emitIdent(Data);
return false;
}

View File

@ -210,7 +210,7 @@ public:
if (getLexer().isNot(AsmToken::EndOfStatement))
return TokError("unexpected token in '.ident' directive");
Lex();
getStreamer().EmitIdent(Data);
getStreamer().emitIdent(Data);
return false;
}

View File

@ -63,7 +63,7 @@ void MCTargetStreamer::changeSection(const MCSection *CurSection,
}
void MCTargetStreamer::emitDwarfFileDirective(StringRef Directive) {
Streamer.EmitRawText(Directive);
Streamer.emitRawText(Directive);
}
void MCTargetStreamer::emitValue(const MCExpr *Value) {
@ -71,7 +71,7 @@ void MCTargetStreamer::emitValue(const MCExpr *Value) {
raw_svector_ostream OS(Str);
Value->print(OS, Streamer.getContext().getAsmInfo());
Streamer.EmitRawText(OS.str());
Streamer.emitRawText(OS.str());
}
void MCTargetStreamer::emitRawBytes(StringRef Data) {
@ -82,7 +82,7 @@ void MCTargetStreamer::emitRawBytes(StringRef Data) {
raw_svector_ostream OS(Str);
OS << Directive << (unsigned)C;
Streamer.EmitRawText(OS.str());
Streamer.emitRawText(OS.str());
}
}
@ -205,9 +205,7 @@ void MCStreamer::emitFill(uint64_t NumBytes, uint8_t FillValue) {
}
/// The implementation in this class just redirects to emitFill.
void MCStreamer::EmitZeros(uint64_t NumBytes) {
emitFill(NumBytes, 0);
}
void MCStreamer::emitZeros(uint64_t NumBytes) { emitFill(NumBytes, 0); }
Expected<unsigned>
MCStreamer::tryEmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
@ -809,7 +807,7 @@ MCSection *MCStreamer::getAssociatedXDataSection(const MCSection *TextSec) {
TextSec);
}
void MCStreamer::EmitSyntaxDirective() {}
void MCStreamer::emitSyntaxDirective() {}
static unsigned encodeSEHRegNum(MCContext &Ctx, MCRegister Reg) {
return Ctx.getRegisterInfo()->getSEHRegNum(Reg);
@ -935,7 +933,7 @@ void MCStreamer::EmitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset) {}
/// EmitRawText - If this file is backed by an assembly streamer, this dumps
/// the specified string in the output .s file. This capability is
/// indicated by the hasRawTextSupport() predicate.
void MCStreamer::EmitRawTextImpl(StringRef String) {
void MCStreamer::emitRawTextImpl(StringRef String) {
// This is not llvm_unreachable for the sake of out of tree backend
// developers who may not have assembly streamers and should serve as a
// reminder to not accidentally call EmitRawText in the absence of such.
@ -944,9 +942,9 @@ void MCStreamer::EmitRawTextImpl(StringRef String) {
"implementation)");
}
void MCStreamer::EmitRawText(const Twine &T) {
void MCStreamer::emitRawText(const Twine &T) {
SmallString<128> Str;
EmitRawTextImpl(T.toStringRef(Str));
emitRawTextImpl(T.toStringRef(Str));
}
void MCStreamer::EmitWindowsUnwindTables() {
@ -1056,14 +1054,14 @@ void MCStreamer::BeginCOFFSymbolDef(const MCSymbol *Symbol) {
void MCStreamer::EndCOFFSymbolDef() {
llvm_unreachable("this directive only supported on COFF targets");
}
void MCStreamer::EmitFileDirective(StringRef Filename) {}
void MCStreamer::emitFileDirective(StringRef Filename) {}
void MCStreamer::EmitCOFFSymbolStorageClass(int StorageClass) {
llvm_unreachable("this directive only supported on COFF targets");
}
void MCStreamer::EmitCOFFSymbolType(int Type) {
llvm_unreachable("this directive only supported on COFF targets");
}
void MCStreamer::EmitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
void MCStreamer::emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
MCSymbol *CsectSym,
unsigned ByteAlign) {
llvm_unreachable("this directive only supported on XCOFF targets");
@ -1073,7 +1071,7 @@ void MCStreamer::emitELFSymverDirective(StringRef AliasName,
const MCSymbol *Aliasee) {}
void MCStreamer::emitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment) {}
void MCStreamer::EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
void MCStreamer::emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
uint64_t Size, unsigned ByteAlignment) {}
void MCStreamer::ChangeSection(MCSection *, const MCExpr *) {}
void MCStreamer::emitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) {}
@ -1094,10 +1092,10 @@ void MCStreamer::emitCodeAlignment(unsigned ByteAlignment,
unsigned MaxBytesToEmit) {}
void MCStreamer::emitValueToOffset(const MCExpr *Offset, unsigned char Value,
SMLoc Loc) {}
void MCStreamer::EmitBundleAlignMode(unsigned AlignPow2) {}
void MCStreamer::EmitBundleLock(bool AlignToEnd) {}
void MCStreamer::emitBundleAlignMode(unsigned AlignPow2) {}
void MCStreamer::emitBundleLock(bool AlignToEnd) {}
void MCStreamer::FinishImpl() {}
void MCStreamer::EmitBundleUnlock() {}
void MCStreamer::emitBundleUnlock() {}
void MCStreamer::SwitchSection(MCSection *Section, const MCExpr *Subsection) {
assert(Section && "Cannot switch to a null section!");

View File

@ -160,7 +160,7 @@ void MCWasmStreamer::emitValueToAlignment(unsigned ByteAlignment, int64_t Value,
MaxBytesToEmit);
}
void MCWasmStreamer::EmitIdent(StringRef IdentString) {
void MCWasmStreamer::emitIdent(StringRef IdentString) {
// TODO(sbc): Add the ident section once we support mergable strings
// sections in the object format
}
@ -223,7 +223,7 @@ void MCWasmStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol,
llvm_unreachable("Wasm doesn't support this directive");
}
void MCWasmStreamer::EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
void MCWasmStreamer::emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
uint64_t Size, unsigned ByteAlignment) {
llvm_unreachable("Wasm doesn't support this directive");
}

View File

@ -304,7 +304,7 @@ void MCWinCOFFStreamer::emitLocalCommonSymbol(MCSymbol *S, uint64_t Size,
emitValueToAlignment(ByteAlignment, 0, 1, 0);
emitLabel(Symbol);
Symbol->setExternal(false);
EmitZeros(Size);
emitZeros(Size);
PopSection();
}
@ -314,13 +314,13 @@ void MCWinCOFFStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol,
llvm_unreachable("not implemented");
}
void MCWinCOFFStreamer::EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
void MCWinCOFFStreamer::emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
uint64_t Size, unsigned ByteAlignment) {
llvm_unreachable("not implemented");
}
// TODO: Implement this if you want to emit .comment section in COFF obj files.
void MCWinCOFFStreamer::EmitIdent(StringRef IdentString) {
void MCWinCOFFStreamer::emitIdent(StringRef IdentString) {
llvm_unreachable("not implemented");
}

View File

@ -52,7 +52,7 @@ void MCXCOFFStreamer::emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
// Emit the alignment and storage for the variable to the section.
emitValueToAlignment(ByteAlignment);
EmitZeros(Size);
emitZeros(Size);
}
void MCXCOFFStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol,
@ -94,7 +94,7 @@ MCStreamer *llvm::createXCOFFStreamer(MCContext &Context,
return S;
}
void MCXCOFFStreamer::EmitXCOFFLocalCommonSymbol(MCSymbol *LabelSym,
void MCXCOFFStreamer::emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym,
uint64_t Size,
MCSymbol *CsectSym,
unsigned ByteAlignment) {

View File

@ -1067,7 +1067,7 @@ void AArch64AsmPrinter::emitInstruction(const MachineInstr *MI) {
SmallString<128> TmpStr;
raw_svector_ostream OS(TmpStr);
PrintDebugValueComment(MI, OS);
OutStreamer->EmitRawText(StringRef(OS.str()));
OutStreamer->emitRawText(StringRef(OS.str()));
}
return;

View File

@ -1810,7 +1810,7 @@ void ARMAsmPrinter::emitInstruction(const MachineInstr *MI) {
return;
}
case ARM::SPACE:
OutStreamer->EmitZeros(MI->getOperand(1).getImm());
OutStreamer->emitZeros(MI->getOperand(1).getImm());
return;
case ARM::TRAP: {
// Non-Darwin binutils don't yet support the "trap" mnemonic.

View File

@ -112,7 +112,7 @@ void HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(MCSymbol *Symbol,
if (ELFSymbol->isUndefined()) {
emitValueToAlignment(ByteAlignment, 0, 1, 0);
emitLabel(Symbol);
EmitZeros(Size);
emitZeros(Size);
}
// Update the maximum alignment of the section if necessary.

View File

@ -2128,8 +2128,8 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
MCSymbolRefExpr::create(JalSym, MCSymbolRefExpr::VK_None,
getContext(), IDLoc);
TOut.getStreamer().EmitRelocDirective(*TmpExpr,
inMicroMipsMode() ? "R_MICROMIPS_JALR" : "R_MIPS_JALR",
TOut.getStreamer().emitRelocDirective(
*TmpExpr, inMicroMipsMode() ? "R_MICROMIPS_JALR" : "R_MIPS_JALR",
RelocJalrExpr, IDLoc, *STI);
TOut.getStreamer().emitLabel(TmpLabel);
}

View File

@ -113,10 +113,10 @@ private:
void sandboxIndirectJump(const MCInst &MI, const MCSubtargetInfo &STI) {
unsigned AddrReg = MI.getOperand(0).getReg();
EmitBundleLock(false);
emitBundleLock(false);
emitMask(AddrReg, IndirectBranchMaskReg, STI);
MipsELFStreamer::emitInstruction(MI, STI);
EmitBundleUnlock();
emitBundleUnlock();
}
// Sandbox memory access or SP change. Insert mask operation before and/or
@ -124,7 +124,7 @@ private:
void sandboxLoadStoreStackChange(const MCInst &MI, unsigned AddrIdx,
const MCSubtargetInfo &STI, bool MaskBefore,
bool MaskAfter) {
EmitBundleLock(false);
emitBundleLock(false);
if (MaskBefore) {
// Sandbox memory access.
unsigned BaseReg = MI.getOperand(AddrIdx).getReg();
@ -137,7 +137,7 @@ private:
assert((Mips::SP == SPReg) && "Unexpected stack-pointer register.");
emitMask(SPReg, LoadStoreStackMaskReg, STI);
}
EmitBundleUnlock();
emitBundleUnlock();
}
public:
@ -181,7 +181,7 @@ public:
report_fatal_error("Dangerous instruction in branch delay slot!");
// Start the sandboxing sequence by emitting call.
EmitBundleLock(true);
emitBundleLock(true);
if (IsIndirectCall) {
unsigned TargetReg = Inst.getOperand(1).getReg();
emitMask(TargetReg, IndirectBranchMaskReg, STI);
@ -193,7 +193,7 @@ public:
if (PendingCall) {
// Finish the sandboxing sequence by emitting branch delay.
MipsELFStreamer::emitInstruction(Inst, STI);
EmitBundleUnlock();
emitBundleUnlock();
PendingCall = false;
return;
}
@ -270,7 +270,7 @@ MCELFStreamer *createMipsNaClELFStreamer(MCContext &Context,
S->getAssembler().setRelaxAll(true);
// Set bundle-alignment as required by the NaCl ABI for the target.
S->EmitBundleAlignMode(Log2(MIPS_NACL_BUNDLE_ALIGN));
S->emitBundleAlignMode(Log2(MIPS_NACL_BUNDLE_ALIGN));
return S;
}

View File

@ -174,8 +174,8 @@ static void emitDirectiveRelocJalr(const MachineInstr &MI,
MCSymbolRefExpr::create(OffsetLabel, OutContext);
const MCExpr *CaleeExpr =
MCSymbolRefExpr::create(Callee, OutContext);
OutStreamer.EmitRelocDirective
(*OffsetExpr,
OutStreamer.emitRelocDirective(
*OffsetExpr,
Subtarget.inMicroMipsMode() ? "R_MICROMIPS_JALR" : "R_MIPS_JALR",
CaleeExpr, SMLoc(), *TM.getMCSubtargetInfo());
OutStreamer.emitLabel(OffsetLabel);

View File

@ -26,13 +26,13 @@ NVPTXTargetStreamer::~NVPTXTargetStreamer() = default;
void NVPTXTargetStreamer::outputDwarfFileDirectives() {
for (const std::string &S : DwarfFiles)
getStreamer().EmitRawText(S.data());
getStreamer().emitRawText(S.data());
DwarfFiles.clear();
}
void NVPTXTargetStreamer::closeLastSection() {
if (HasSections)
getStreamer().EmitRawText("\t}");
getStreamer().emitRawText("\t}");
}
void NVPTXTargetStreamer::emitDwarfFileDirective(StringRef Directive) {
@ -128,7 +128,7 @@ void NVPTXTargetStreamer::emitRawBytes(StringRef Data) {
if (Label == Directive)
Label = ",";
}
Streamer.EmitRawText(OS.str());
Streamer.emitRawText(OS.str());
}
#endif
}

View File

@ -437,7 +437,7 @@ bool NVPTXAsmPrinter::isLoopHeaderOfNoUnroll(
void NVPTXAsmPrinter::emitBasicBlockStart(const MachineBasicBlock &MBB) {
AsmPrinter::emitBasicBlockStart(MBB);
if (isLoopHeaderOfNoUnroll(MBB))
OutStreamer->EmitRawText(StringRef("\t.pragma \"nounroll\";\n"));
OutStreamer->emitRawText(StringRef("\t.pragma \"nounroll\";\n"));
}
void NVPTXAsmPrinter::emitFunctionEntryLabel() {
@ -467,11 +467,11 @@ void NVPTXAsmPrinter::emitFunctionEntryLabel() {
if (isKernelFunction(*F))
emitKernelFunctionDirectives(*F, O);
OutStreamer->EmitRawText(O.str());
OutStreamer->emitRawText(O.str());
VRegMapping.clear();
// Emit open brace for function body.
OutStreamer->EmitRawText(StringRef("{\n"));
OutStreamer->emitRawText(StringRef("{\n"));
setAndEmitFunctionVirtualRegisters(*MF);
// Emit initial .loc debug directive for correct relocation symbol data.
if (MMI && MMI->hasDebugInfo())
@ -485,7 +485,7 @@ bool NVPTXAsmPrinter::runOnMachineFunction(MachineFunction &F) {
// debug labels/data after the last basic block.
// We need to emit the closing brace here because we don't have function that
// finished emission of the function body.
OutStreamer->EmitRawText(StringRef("}\n"));
OutStreamer->emitRawText(StringRef("}\n"));
return Result;
}
@ -493,7 +493,7 @@ void NVPTXAsmPrinter::emitFunctionBodyStart() {
SmallString<128> Str;
raw_svector_ostream O(Str);
emitDemotedVars(&MF->getFunction(), O);
OutStreamer->EmitRawText(O.str());
OutStreamer->emitRawText(O.str());
}
void NVPTXAsmPrinter::emitFunctionBodyEnd() {
@ -792,13 +792,13 @@ bool NVPTXAsmPrinter::doInitialization(Module &M) {
// Emit header before any dwarf directives are emitted below.
emitHeader(M, OS1, *STI);
OutStreamer->EmitRawText(OS1.str());
OutStreamer->emitRawText(OS1.str());
// Emit module-level inline asm if it exists.
if (!M.getModuleInlineAsm().empty()) {
OutStreamer->AddComment("Start of file scope inline assembly");
OutStreamer->AddBlankLine();
OutStreamer->EmitRawText(StringRef(M.getModuleInlineAsm()));
OutStreamer->emitRawText(StringRef(M.getModuleInlineAsm()));
OutStreamer->AddBlankLine();
OutStreamer->AddComment("End of file scope inline assembly");
OutStreamer->AddBlankLine();
@ -838,7 +838,7 @@ void NVPTXAsmPrinter::emitGlobals(const Module &M) {
OS2 << '\n';
OutStreamer->EmitRawText(OS2.str());
OutStreamer->emitRawText(OS2.str());
}
void NVPTXAsmPrinter::emitHeader(Module &M, raw_ostream &O,
@ -929,7 +929,7 @@ bool NVPTXAsmPrinter::doFinalization(Module &M) {
static_cast<NVPTXTargetStreamer *>(OutStreamer->getTargetStreamer())
->closeLastSection();
// Emit empty .debug_loc section for better support of the empty files.
OutStreamer->EmitRawText("\t.section\t.debug_loc\t{\t}");
OutStreamer->emitRawText("\t.section\t.debug_loc\t{\t}");
}
// Output last DWARF .file directives, if any.
@ -1684,7 +1684,7 @@ void NVPTXAsmPrinter::setAndEmitFunctionVirtualRegisters(
}
}
OutStreamer->EmitRawText(O.str());
OutStreamer->emitRawText(O.str());
}
void NVPTXAsmPrinter::printFPConstant(const ConstantFP *Fp, raw_ostream &O) {

View File

@ -1623,7 +1623,7 @@ void PPCAIXAsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
uint64_t Size = DL.getTypeAllocSize(GV->getType()->getElementType());
if (GVKind.isBSSLocal())
OutStreamer->EmitXCOFFLocalCommonSymbol(
OutStreamer->emitXCOFFLocalCommonSymbol(
GVSym, Size, Csect->getQualNameSymbol(), Align);
else
OutStreamer->emitCommonSymbol(Csect->getQualNameSymbol(), Size, Align);

View File

@ -643,7 +643,7 @@ void X86AsmPrinter::emitStartOfAsmFile(Module &M) {
OutStreamer->emitAssignment(
S, MCConstantExpr::create(Feat00Flags, MMI->getContext()));
}
OutStreamer->EmitSyntaxDirective();
OutStreamer->emitSyntaxDirective();
// If this is not inline asm and we're in 16-bit
// mode prefix assembly with .code16.

View File

@ -158,7 +158,7 @@ void XCoreAsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
// The ABI requires that unsigned scalar types smaller than 32 bits
// are padded to 32 bits.
if (Size < 4)
OutStreamer->EmitZeros(4 - Size);
OutStreamer->emitZeros(4 - Size);
// Mark the end of the global
getTargetStreamer().emitCCBottomData(GVSym->getName());
@ -267,7 +267,7 @@ void XCoreAsmPrinter::emitInstruction(const MachineInstr *MI) {
O << "\tmov "
<< XCoreInstPrinter::getRegisterName(MI->getOperand(0).getReg()) << ", "
<< XCoreInstPrinter::getRegisterName(MI->getOperand(1).getReg());
OutStreamer->EmitRawText(O.str());
OutStreamer->emitRawText(O.str());
return;
}
break;
@ -280,7 +280,7 @@ void XCoreAsmPrinter::emitInstruction(const MachineInstr *MI) {
else
printInlineJT32(MI, 0, O);
O << '\n';
OutStreamer->EmitRawText(O.str());
OutStreamer->emitRawText(O.str());
return;
}