Skip to content

Commit 9ee15bb

Browse files
committed
[MC] Lower case the first letter of EmitCOFF* EmitWin* EmitCV*. NFC
1 parent a1ec3c5 commit 9ee15bb

27 files changed

+251
-253
lines changed

llvm/include/llvm/MC/MCStreamer.h

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ class MCStreamer {
249249
return CurrentWinFrameInfo;
250250
}
251251

252-
virtual void EmitWindowsUnwindTables(WinEH::FrameInfo *Frame);
252+
virtual void emitWindowsUnwindTables(WinEH::FrameInfo *Frame);
253253

254-
virtual void EmitWindowsUnwindTables();
254+
virtual void emitWindowsUnwindTables();
255255

256256
virtual void emitRawTextImpl(StringRef String);
257257

@@ -557,35 +557,35 @@ class MCStreamer {
557557
/// Emit the storage class of the symbol.
558558
///
559559
/// \param StorageClass - The storage class the symbol should have.
560-
virtual void EmitCOFFSymbolStorageClass(int StorageClass);
560+
virtual void emitCOFFSymbolStorageClass(int StorageClass);
561561

562562
/// Emit the type of the symbol.
563563
///
564564
/// \param Type - A COFF type identifier (see COFF::SymbolType in X86COFF.h)
565-
virtual void EmitCOFFSymbolType(int Type);
565+
virtual void emitCOFFSymbolType(int Type);
566566

567567
/// Marks the end of the symbol definition.
568568
virtual void EndCOFFSymbolDef();
569569

570-
virtual void EmitCOFFSafeSEH(MCSymbol const *Symbol);
570+
virtual void emitCOFFSafeSEH(MCSymbol const *Symbol);
571571

572572
/// Emits the symbol table index of a Symbol into the current section.
573-
virtual void EmitCOFFSymbolIndex(MCSymbol const *Symbol);
573+
virtual void emitCOFFSymbolIndex(MCSymbol const *Symbol);
574574

575575
/// Emits a COFF section index.
576576
///
577577
/// \param Symbol - Symbol the section number relocation should point to.
578-
virtual void EmitCOFFSectionIndex(MCSymbol const *Symbol);
578+
virtual void emitCOFFSectionIndex(MCSymbol const *Symbol);
579579

580580
/// Emits a COFF section relative relocation.
581581
///
582582
/// \param Symbol - Symbol the section relative relocation should point to.
583-
virtual void EmitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset);
583+
virtual void emitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset);
584584

585585
/// Emits a COFF image relative relocation.
586586
///
587587
/// \param Symbol - Symbol the image relative relocation should point to.
588-
virtual void EmitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset);
588+
virtual void emitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset);
589589

590590
/// Emits an lcomm directive with XCOFF csect information.
591591
///
@@ -926,16 +926,16 @@ class MCStreamer {
926926
/// Associate a filename with a specified logical file number, and also
927927
/// specify that file's checksum information. This implements the '.cv_file 4
928928
/// "foo.c"' assembler directive. Returns true on success.
929-
virtual bool EmitCVFileDirective(unsigned FileNo, StringRef Filename,
929+
virtual bool emitCVFileDirective(unsigned FileNo, StringRef Filename,
930930
ArrayRef<uint8_t> Checksum,
931931
unsigned ChecksumKind);
932932

933933
/// Introduces a function id for use with .cv_loc.
934-
virtual bool EmitCVFuncIdDirective(unsigned FunctionId);
934+
virtual bool emitCVFuncIdDirective(unsigned FunctionId);
935935

936936
/// Introduces an inline call site id for use with .cv_loc. Includes
937937
/// extra information for inline line table generation.
938-
virtual bool EmitCVInlineSiteIdDirective(unsigned FunctionId, unsigned IAFunc,
938+
virtual bool emitCVInlineSiteIdDirective(unsigned FunctionId, unsigned IAFunc,
939939
unsigned IAFile, unsigned IALine,
940940
unsigned IACol, SMLoc Loc);
941941

@@ -991,7 +991,7 @@ class MCStreamer {
991991
virtual void emitCVFileChecksumOffsetDirective(unsigned FileNo) {}
992992

993993
/// This implements the CodeView '.cv_fpo_data' assembler directive.
994-
virtual void EmitCVFPOData(const MCSymbol *ProcSym, SMLoc Loc = {}) {}
994+
virtual void emitCVFPOData(const MCSymbol *ProcSym, SMLoc Loc = {}) {}
995995

996996
/// Emit the absolute difference between two symbols.
997997
///
@@ -1030,28 +1030,28 @@ class MCStreamer {
10301030
virtual void emitCFIWindowSave();
10311031
virtual void emitCFINegateRAState();
10321032

1033-
virtual void EmitWinCFIStartProc(const MCSymbol *Symbol, SMLoc Loc = SMLoc());
1034-
virtual void EmitWinCFIEndProc(SMLoc Loc = SMLoc());
1033+
virtual void emitWinCFIStartProc(const MCSymbol *Symbol, SMLoc Loc = SMLoc());
1034+
virtual void emitWinCFIEndProc(SMLoc Loc = SMLoc());
10351035
/// This is used on platforms, such as Windows on ARM64, that require function
10361036
/// or funclet sizes to be emitted in .xdata before the End marker is emitted
10371037
/// for the frame. We cannot use the End marker, as it is not set at the
10381038
/// point of emitting .xdata, in order to indicate that the frame is active.
1039-
virtual void EmitWinCFIFuncletOrFuncEnd(SMLoc Loc = SMLoc());
1040-
virtual void EmitWinCFIStartChained(SMLoc Loc = SMLoc());
1041-
virtual void EmitWinCFIEndChained(SMLoc Loc = SMLoc());
1042-
virtual void EmitWinCFIPushReg(MCRegister Register, SMLoc Loc = SMLoc());
1043-
virtual void EmitWinCFISetFrame(MCRegister Register, unsigned Offset,
1039+
virtual void emitWinCFIFuncletOrFuncEnd(SMLoc Loc = SMLoc());
1040+
virtual void emitWinCFIStartChained(SMLoc Loc = SMLoc());
1041+
virtual void emitWinCFIEndChained(SMLoc Loc = SMLoc());
1042+
virtual void emitWinCFIPushReg(MCRegister Register, SMLoc Loc = SMLoc());
1043+
virtual void emitWinCFISetFrame(MCRegister Register, unsigned Offset,
10441044
SMLoc Loc = SMLoc());
1045-
virtual void EmitWinCFIAllocStack(unsigned Size, SMLoc Loc = SMLoc());
1046-
virtual void EmitWinCFISaveReg(MCRegister Register, unsigned Offset,
1045+
virtual void emitWinCFIAllocStack(unsigned Size, SMLoc Loc = SMLoc());
1046+
virtual void emitWinCFISaveReg(MCRegister Register, unsigned Offset,
10471047
SMLoc Loc = SMLoc());
1048-
virtual void EmitWinCFISaveXMM(MCRegister Register, unsigned Offset,
1048+
virtual void emitWinCFISaveXMM(MCRegister Register, unsigned Offset,
10491049
SMLoc Loc = SMLoc());
1050-
virtual void EmitWinCFIPushFrame(bool Code, SMLoc Loc = SMLoc());
1051-
virtual void EmitWinCFIEndProlog(SMLoc Loc = SMLoc());
1052-
virtual void EmitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except,
1050+
virtual void emitWinCFIPushFrame(bool Code, SMLoc Loc = SMLoc());
1051+
virtual void emitWinCFIEndProlog(SMLoc Loc = SMLoc());
1052+
virtual void emitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except,
10531053
SMLoc Loc = SMLoc());
1054-
virtual void EmitWinEHHandlerData(SMLoc Loc = SMLoc());
1054+
virtual void emitWinEHHandlerData(SMLoc Loc = SMLoc());
10551055

10561056
virtual void emitCGProfileEntry(const MCSymbolRefExpr *From,
10571057
const MCSymbolRefExpr *To, uint64_t Count);

llvm/include/llvm/MC/MCWinCOFFStreamer.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ class MCWinCOFFStreamer : public MCObjectStreamer {
4646
bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;
4747
void emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override;
4848
void BeginCOFFSymbolDef(MCSymbol const *Symbol) override;
49-
void EmitCOFFSymbolStorageClass(int StorageClass) override;
50-
void EmitCOFFSymbolType(int Type) override;
49+
void emitCOFFSymbolStorageClass(int StorageClass) override;
50+
void emitCOFFSymbolType(int Type) override;
5151
void EndCOFFSymbolDef() override;
52-
void EmitCOFFSafeSEH(MCSymbol const *Symbol) override;
53-
void EmitCOFFSymbolIndex(MCSymbol const *Symbol) override;
54-
void EmitCOFFSectionIndex(MCSymbol const *Symbol) override;
55-
void EmitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset) override;
56-
void EmitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset) override;
52+
void emitCOFFSafeSEH(MCSymbol const *Symbol) override;
53+
void emitCOFFSymbolIndex(MCSymbol const *Symbol) override;
54+
void emitCOFFSectionIndex(MCSymbol const *Symbol) override;
55+
void emitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset) override;
56+
void emitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset) override;
5757
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
5858
unsigned ByteAlignment) override;
5959
void emitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
@@ -64,7 +64,7 @@ class MCWinCOFFStreamer : public MCObjectStreamer {
6464
void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
6565
unsigned ByteAlignment) override;
6666
void emitIdent(StringRef IdentString) override;
67-
void EmitWinEHHandlerData(SMLoc Loc) override;
67+
void emitWinEHHandlerData(SMLoc Loc) override;
6868
void emitCGProfileEntry(const MCSymbolRefExpr *From,
6969
const MCSymbolRefExpr *To, uint64_t Count) override;
7070
void finishImpl() override;

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,10 +1812,10 @@ void AsmPrinter::emitGlobalAlias(Module &M, const GlobalAlias &GA) {
18121812
OutStreamer->emitSymbolAttribute(Name, MCSA_ELF_TypeFunction);
18131813
if (TM.getTargetTriple().isOSBinFormatCOFF()) {
18141814
OutStreamer->BeginCOFFSymbolDef(Name);
1815-
OutStreamer->EmitCOFFSymbolStorageClass(
1815+
OutStreamer->emitCOFFSymbolStorageClass(
18161816
GA.hasLocalLinkage() ? COFF::IMAGE_SYM_CLASS_STATIC
18171817
: COFF::IMAGE_SYM_CLASS_EXTERNAL);
1818-
OutStreamer->EmitCOFFSymbolType(COFF::IMAGE_SYM_DTYPE_FUNCTION
1818+
OutStreamer->emitCOFFSymbolType(COFF::IMAGE_SYM_DTYPE_FUNCTION
18191819
<< COFF::SCT_COMPLEX_TYPE_SHIFT);
18201820
OutStreamer->EndCOFFSymbolDef();
18211821
}
@@ -2626,7 +2626,7 @@ void AsmPrinter::emitLabelPlusOffset(const MCSymbol *Label, uint64_t Offset,
26262626
unsigned Size,
26272627
bool IsSectionRelative) const {
26282628
if (MAI->needsDwarfSectionOffsetDirective() && IsSectionRelative) {
2629-
OutStreamer->EmitCOFFSecRel32(Label, Offset);
2629+
OutStreamer->emitCOFFSecRel32(Label, Offset);
26302630
if (Size > 4)
26312631
OutStreamer->emitZeros(Size - 4);
26322632
return;

llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void AsmPrinter::emitDwarfSymbolReference(const MCSymbol *Label,
158158
if (MAI->needsDwarfSectionOffsetDirective()) {
159159
assert(!isDwarf64() &&
160160
"emitting DWARF64 is not implemented for COFF targets");
161-
OutStreamer->EmitCOFFSecRel32(Label, /*Offset=*/0);
161+
OutStreamer->emitCOFFSecRel32(Label, /*Offset=*/0);
162162
return;
163163
}
164164

llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ unsigned CodeViewDebug::maybeRecordFile(const DIFile *F) {
224224
break;
225225
}
226226
}
227-
bool Success = OS.EmitCVFileDirective(NextId, FullPath, ChecksumAsBytes,
227+
bool Success = OS.emitCVFileDirective(NextId, FullPath, ChecksumAsBytes,
228228
static_cast<unsigned>(CSKind));
229229
(void)Success;
230230
assert(Success && ".cv_file directive failed");
@@ -245,7 +245,7 @@ CodeViewDebug::getInlineSite(const DILocation *InlinedAt,
245245
.SiteFuncId;
246246

247247
Site->SiteFuncId = NextFuncId++;
248-
OS.EmitCVInlineSiteIdDirective(
248+
OS.emitCVInlineSiteIdDirective(
249249
Site->SiteFuncId, ParentFuncId, maybeRecordFile(InlinedAt->getFile()),
250250
InlinedAt->getLine(), InlinedAt->getColumn(), SMLoc());
251251
Site->Inlinee = Inlinee;
@@ -1073,9 +1073,9 @@ void CodeViewDebug::emitDebugInfoForThunk(const Function *GV,
10731073
OS.AddComment("PtrNext");
10741074
OS.emitInt32(0);
10751075
OS.AddComment("Thunk section relative address");
1076-
OS.EmitCOFFSecRel32(Fn, /*Offset=*/0);
1076+
OS.emitCOFFSecRel32(Fn, /*Offset=*/0);
10771077
OS.AddComment("Thunk section index");
1078-
OS.EmitCOFFSectionIndex(Fn);
1078+
OS.emitCOFFSectionIndex(Fn);
10791079
OS.AddComment("Code size");
10801080
OS.emitAbsoluteSymbolDiff(FI.End, Fn, 2);
10811081
OS.AddComment("Ordinal");
@@ -1125,7 +1125,7 @@ void CodeViewDebug::emitDebugInfoForFunction(const Function *GV,
11251125

11261126
// Emit FPO data, but only on 32-bit x86. No other platforms use it.
11271127
if (Triple(MMI->getModule()->getTargetTriple()).getArch() == Triple::x86)
1128-
OS.EmitCVFPOData(Fn);
1128+
OS.emitCVFPOData(Fn);
11291129

11301130
// Emit a symbol subsection, required by VS2012+ to find function boundaries.
11311131
OS.AddComment("Symbol subsection for " + Twine(FuncName));
@@ -1153,9 +1153,9 @@ void CodeViewDebug::emitDebugInfoForFunction(const Function *GV,
11531153
OS.AddComment("Function type index");
11541154
OS.emitInt32(getFuncIdForSubprogram(GV->getSubprogram()).getIndex());
11551155
OS.AddComment("Function section relative address");
1156-
OS.EmitCOFFSecRel32(Fn, /*Offset=*/0);
1156+
OS.emitCOFFSecRel32(Fn, /*Offset=*/0);
11571157
OS.AddComment("Function section index");
1158-
OS.EmitCOFFSectionIndex(Fn);
1158+
OS.emitCOFFSectionIndex(Fn);
11591159
OS.AddComment("Flags");
11601160
OS.emitInt8(0);
11611161
// Emit the function display name as a null-terminated string.
@@ -1200,9 +1200,9 @@ void CodeViewDebug::emitDebugInfoForFunction(const Function *GV,
12001200
MCSymbol *Label = Annot.first;
12011201
MDTuple *Strs = cast<MDTuple>(Annot.second);
12021202
MCSymbol *AnnotEnd = beginSymbolRecord(SymbolKind::S_ANNOTATION);
1203-
OS.EmitCOFFSecRel32(Label, /*Offset=*/0);
1203+
OS.emitCOFFSecRel32(Label, /*Offset=*/0);
12041204
// FIXME: Make sure we don't overflow the max record size.
1205-
OS.EmitCOFFSectionIndex(Label);
1205+
OS.emitCOFFSectionIndex(Label);
12061206
OS.emitInt16(Strs->getNumOperands());
12071207
for (Metadata *MD : Strs->operands()) {
12081208
// MDStrings are null terminated, so we can do EmitBytes and get the
@@ -1220,9 +1220,9 @@ void CodeViewDebug::emitDebugInfoForFunction(const Function *GV,
12201220
const DIType *DITy = std::get<2>(HeapAllocSite);
12211221
MCSymbol *HeapAllocEnd = beginSymbolRecord(SymbolKind::S_HEAPALLOCSITE);
12221222
OS.AddComment("Call site offset");
1223-
OS.EmitCOFFSecRel32(BeginLabel, /*Offset=*/0);
1223+
OS.emitCOFFSecRel32(BeginLabel, /*Offset=*/0);
12241224
OS.AddComment("Call site section index");
1225-
OS.EmitCOFFSectionIndex(BeginLabel);
1225+
OS.emitCOFFSectionIndex(BeginLabel);
12261226
OS.AddComment("Call instruction length");
12271227
OS.emitAbsoluteSymbolDiff(EndLabel, BeginLabel, 2);
12281228
OS.AddComment("Type index");
@@ -1512,7 +1512,7 @@ void CodeViewDebug::beginFunctionImpl(const MachineFunction *MF) {
15121512
// FIXME: Set GuardCfg when it is implemented.
15131513
CurFn->FrameProcOpts = FPO;
15141514

1515-
OS.EmitCVFuncIdDirective(CurFn->FuncId);
1515+
OS.emitCVFuncIdDirective(CurFn->FuncId);
15161516

15171517
// Find the end of the function prolog. First known non-DBG_VALUE and
15181518
// non-frame setup location marks the beginning of the function body.
@@ -2884,9 +2884,9 @@ void CodeViewDebug::emitLexicalBlock(const LexicalBlock &Block,
28842884
OS.AddComment("Code size");
28852885
OS.emitAbsoluteSymbolDiff(Block.End, Block.Begin, 4); // Code Size
28862886
OS.AddComment("Function section relative address");
2887-
OS.EmitCOFFSecRel32(Block.Begin, /*Offset=*/0); // Func Offset
2887+
OS.emitCOFFSecRel32(Block.Begin, /*Offset=*/0); // Func Offset
28882888
OS.AddComment("Function section index");
2889-
OS.EmitCOFFSectionIndex(FI.Begin); // Func Symbol
2889+
OS.emitCOFFSectionIndex(FI.Begin); // Func Symbol
28902890
OS.AddComment("Lexical block name");
28912891
emitNullTerminatedSymbolName(OS, Block.Name); // Name
28922892
endSymbolRecord(RecordEnd);
@@ -3375,10 +3375,10 @@ void CodeViewDebug::emitDebugInfoForGlobal(const CVGlobalVariable &CVGV) {
33753375
if (CVGlobalVariableOffsets.find(DIGV) != CVGlobalVariableOffsets.end())
33763376
// Use the offset seen while collecting info on globals.
33773377
Offset = CVGlobalVariableOffsets[DIGV];
3378-
OS.EmitCOFFSecRel32(GVSym, Offset);
3378+
OS.emitCOFFSecRel32(GVSym, Offset);
33793379

33803380
OS.AddComment("Segment");
3381-
OS.EmitCOFFSectionIndex(GVSym);
3381+
OS.emitCOFFSectionIndex(GVSym);
33823382
OS.AddComment("Name");
33833383
const unsigned LengthOfDataRecord = 12;
33843384
emitNullTerminatedSymbolName(OS, QualifiedName, LengthOfDataRecord);

llvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,17 @@ void WinCFGuard::endModule() {
109109
auto &OS = *Asm->OutStreamer;
110110
OS.SwitchSection(Asm->OutContext.getObjectFileInfo()->getGFIDsSection());
111111
for (const MCSymbol *S : GFIDsEntries)
112-
OS.EmitCOFFSymbolIndex(S);
112+
OS.emitCOFFSymbolIndex(S);
113113

114114
// Emit the symbol index of each GIATs entry to form the .giats section.
115115
OS.SwitchSection(Asm->OutContext.getObjectFileInfo()->getGIATsSection());
116116
for (const MCSymbol *S : GIATsEntries) {
117-
OS.EmitCOFFSymbolIndex(S);
117+
OS.emitCOFFSymbolIndex(S);
118118
}
119119

120120
// Emit the symbol index of each longjmp target to form the .gljmp section.
121121
OS.SwitchSection(Asm->OutContext.getObjectFileInfo()->getGLJMPSection());
122122
for (const MCSymbol *S : LongjmpTargets) {
123-
OS.EmitCOFFSymbolIndex(S);
123+
OS.emitCOFFSymbolIndex(S);
124124
}
125125
}

0 commit comments

Comments
 (0)