@@ -35,23 +35,23 @@ class COFFMasmParser : public MCAsmParserExtension {
35
35
getParser ().addDirectiveHandler (Directive, Handler);
36
36
}
37
37
38
- bool ParseSectionSwitch (StringRef SectionName, unsigned Characteristics);
38
+ bool parseSectionSwitch (StringRef SectionName, unsigned Characteristics);
39
39
40
- bool ParseSectionSwitch (StringRef SectionName, unsigned Characteristics,
40
+ bool parseSectionSwitch (StringRef SectionName, unsigned Characteristics,
41
41
StringRef COMDATSymName, COFF::COMDATType Type,
42
42
Align Alignment);
43
43
44
- bool ParseDirectiveProc (StringRef, SMLoc);
45
- bool ParseDirectiveEndProc (StringRef, SMLoc);
46
- bool ParseDirectiveSegment (StringRef, SMLoc);
47
- bool ParseDirectiveSegmentEnd (StringRef, SMLoc);
48
- bool ParseDirectiveIncludelib (StringRef, SMLoc);
49
- bool ParseDirectiveOption (StringRef, SMLoc);
44
+ bool parseDirectiveProc (StringRef, SMLoc);
45
+ bool parseDirectiveEndProc (StringRef, SMLoc);
46
+ bool parseDirectiveSegment (StringRef, SMLoc);
47
+ bool parseDirectiveSegmentEnd (StringRef, SMLoc);
48
+ bool parseDirectiveIncludelib (StringRef, SMLoc);
49
+ bool parseDirectiveOption (StringRef, SMLoc);
50
50
51
- bool ParseDirectiveAlias (StringRef, SMLoc);
51
+ bool parseDirectiveAlias (StringRef, SMLoc);
52
52
53
- bool ParseSEHDirectiveAllocStack (StringRef, SMLoc);
54
- bool ParseSEHDirectiveEndProlog (StringRef, SMLoc);
53
+ bool parseSEHDirectiveAllocStack (StringRef, SMLoc);
54
+ bool parseSEHDirectiveEndProlog (StringRef, SMLoc);
55
55
56
56
bool IgnoreDirective (StringRef, SMLoc) {
57
57
while (!getLexer ().is (AsmToken::EndOfStatement)) {
@@ -65,9 +65,9 @@ class COFFMasmParser : public MCAsmParserExtension {
65
65
MCAsmParserExtension::Initialize (Parser);
66
66
67
67
// x64 directives
68
- addDirectiveHandler<&COFFMasmParser::ParseSEHDirectiveAllocStack >(
68
+ addDirectiveHandler<&COFFMasmParser::parseSEHDirectiveAllocStack >(
69
69
" .allocstack" );
70
- addDirectiveHandler<&COFFMasmParser::ParseSEHDirectiveEndProlog >(
70
+ addDirectiveHandler<&COFFMasmParser::parseSEHDirectiveEndProlog >(
71
71
" .endprolog" );
72
72
73
73
// Code label directives
@@ -115,20 +115,20 @@ class COFFMasmParser : public MCAsmParserExtension {
115
115
// goto
116
116
117
117
// Miscellaneous directives
118
- addDirectiveHandler<&COFFMasmParser::ParseDirectiveAlias >(" alias" );
118
+ addDirectiveHandler<&COFFMasmParser::parseDirectiveAlias >(" alias" );
119
119
// assume
120
120
// .fpo
121
- addDirectiveHandler<&COFFMasmParser::ParseDirectiveIncludelib >(
121
+ addDirectiveHandler<&COFFMasmParser::parseDirectiveIncludelib >(
122
122
" includelib" );
123
- addDirectiveHandler<&COFFMasmParser::ParseDirectiveOption >(" option" );
123
+ addDirectiveHandler<&COFFMasmParser::parseDirectiveOption >(" option" );
124
124
// popcontext
125
125
// pushcontext
126
126
// .safeseh
127
127
128
128
// Procedure directives
129
- addDirectiveHandler<&COFFMasmParser::ParseDirectiveEndProc >(" endp" );
129
+ addDirectiveHandler<&COFFMasmParser::parseDirectiveEndProc >(" endp" );
130
130
// invoke (32-bit only)
131
- addDirectiveHandler<&COFFMasmParser::ParseDirectiveProc >(" proc" );
131
+ addDirectiveHandler<&COFFMasmParser::parseDirectiveProc >(" proc" );
132
132
// proto
133
133
134
134
// Processor directives; all ignored
@@ -153,17 +153,17 @@ class COFFMasmParser : public MCAsmParserExtension {
153
153
// .alpha (32-bit only, order segments alphabetically)
154
154
// .dosseg (32-bit only, order segments in DOS convention)
155
155
// .seq (32-bit only, order segments sequentially)
156
- addDirectiveHandler<&COFFMasmParser::ParseDirectiveSegmentEnd >(" ends" );
156
+ addDirectiveHandler<&COFFMasmParser::parseDirectiveSegmentEnd >(" ends" );
157
157
// group (32-bit only)
158
- addDirectiveHandler<&COFFMasmParser::ParseDirectiveSegment >(" segment" );
158
+ addDirectiveHandler<&COFFMasmParser::parseDirectiveSegment >(" segment" );
159
159
160
160
// Simplified segment directives
161
- addDirectiveHandler<&COFFMasmParser::ParseSectionDirectiveCode >(" .code" );
161
+ addDirectiveHandler<&COFFMasmParser::parseSectionDirectiveCode >(" .code" );
162
162
// .const
163
+ addDirectiveHandler<&COFFMasmParser::parseSectionDirectiveInitializedData>(
164
+ " .data" );
163
165
addDirectiveHandler<
164
- &COFFMasmParser::ParseSectionDirectiveInitializedData>(" .data" );
165
- addDirectiveHandler<
166
- &COFFMasmParser::ParseSectionDirectiveUninitializedData>(" .data?" );
166
+ &COFFMasmParser::parseSectionDirectiveUninitializedData>(" .data?" );
167
167
// .exit
168
168
// .fardata
169
169
// .fardata?
@@ -182,20 +182,20 @@ class COFFMasmParser : public MCAsmParserExtension {
182
182
// typedef
183
183
}
184
184
185
- bool ParseSectionDirectiveCode (StringRef, SMLoc) {
186
- return ParseSectionSwitch (" .text" , COFF::IMAGE_SCN_CNT_CODE |
185
+ bool parseSectionDirectiveCode (StringRef, SMLoc) {
186
+ return parseSectionSwitch (" .text" , COFF::IMAGE_SCN_CNT_CODE |
187
187
COFF::IMAGE_SCN_MEM_EXECUTE |
188
188
COFF::IMAGE_SCN_MEM_READ);
189
189
}
190
190
191
- bool ParseSectionDirectiveInitializedData (StringRef, SMLoc) {
192
- return ParseSectionSwitch (" .data" , COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
191
+ bool parseSectionDirectiveInitializedData (StringRef, SMLoc) {
192
+ return parseSectionSwitch (" .data" , COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
193
193
COFF::IMAGE_SCN_MEM_READ |
194
194
COFF::IMAGE_SCN_MEM_WRITE);
195
195
}
196
196
197
- bool ParseSectionDirectiveUninitializedData (StringRef, SMLoc) {
198
- return ParseSectionSwitch (" .bss" , COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA |
197
+ bool parseSectionDirectiveUninitializedData (StringRef, SMLoc) {
198
+ return parseSectionSwitch (" .bss" , COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA |
199
199
COFF::IMAGE_SCN_MEM_READ |
200
200
COFF::IMAGE_SCN_MEM_WRITE);
201
201
}
@@ -210,13 +210,13 @@ class COFFMasmParser : public MCAsmParserExtension {
210
210
211
211
} // end anonymous namespace.
212
212
213
- bool COFFMasmParser::ParseSectionSwitch (StringRef SectionName,
213
+ bool COFFMasmParser::parseSectionSwitch (StringRef SectionName,
214
214
unsigned Characteristics) {
215
- return ParseSectionSwitch (SectionName, Characteristics, " " ,
215
+ return parseSectionSwitch (SectionName, Characteristics, " " ,
216
216
(COFF::COMDATType)0 , Align (16 ));
217
217
}
218
218
219
- bool COFFMasmParser::ParseSectionSwitch (StringRef SectionName,
219
+ bool COFFMasmParser::parseSectionSwitch (StringRef SectionName,
220
220
unsigned Characteristics,
221
221
StringRef COMDATSymName,
222
222
COFF::COMDATType Type,
@@ -233,7 +233,7 @@ bool COFFMasmParser::ParseSectionSwitch(StringRef SectionName,
233
233
return false ;
234
234
}
235
235
236
- bool COFFMasmParser::ParseDirectiveSegment (StringRef Directive, SMLoc Loc) {
236
+ bool COFFMasmParser::parseDirectiveSegment (StringRef Directive, SMLoc Loc) {
237
237
StringRef SegmentName;
238
238
if (!getLexer ().is (AsmToken::Identifier))
239
239
return TokError (" expected identifier in directive" );
@@ -367,9 +367,9 @@ bool COFFMasmParser::ParseDirectiveSegment(StringRef Directive, SMLoc Loc) {
367
367
return false ;
368
368
}
369
369
370
- // / ParseDirectiveSegmentEnd
370
+ // / parseDirectiveSegmentEnd
371
371
// / ::= identifier "ends"
372
- bool COFFMasmParser::ParseDirectiveSegmentEnd (StringRef Directive, SMLoc Loc) {
372
+ bool COFFMasmParser::parseDirectiveSegmentEnd (StringRef Directive, SMLoc Loc) {
373
373
StringRef SegmentName;
374
374
if (!getLexer ().is (AsmToken::Identifier))
375
375
return TokError (" expected identifier in directive" );
@@ -380,9 +380,9 @@ bool COFFMasmParser::ParseDirectiveSegmentEnd(StringRef Directive, SMLoc Loc) {
380
380
return false ;
381
381
}
382
382
383
- // / ParseDirectiveIncludelib
383
+ // / parseDirectiveIncludelib
384
384
// / ::= "includelib" identifier
385
- bool COFFMasmParser::ParseDirectiveIncludelib (StringRef Directive, SMLoc Loc) {
385
+ bool COFFMasmParser::parseDirectiveIncludelib (StringRef Directive, SMLoc Loc) {
386
386
StringRef Lib;
387
387
if (getParser ().parseIdentifier (Lib))
388
388
return TokError (" expected identifier in includelib directive" );
@@ -398,9 +398,9 @@ bool COFFMasmParser::ParseDirectiveIncludelib(StringRef Directive, SMLoc Loc) {
398
398
return false ;
399
399
}
400
400
401
- // / ParseDirectiveOption
401
+ // / parseDirectiveOption
402
402
// / ::= "option" option-list
403
- bool COFFMasmParser::ParseDirectiveOption (StringRef Directive, SMLoc Loc) {
403
+ bool COFFMasmParser::parseDirectiveOption (StringRef Directive, SMLoc Loc) {
404
404
auto parseOption = [&]() -> bool {
405
405
StringRef Option;
406
406
if (getParser ().parseIdentifier (Option))
@@ -435,12 +435,12 @@ bool COFFMasmParser::ParseDirectiveOption(StringRef Directive, SMLoc Loc) {
435
435
return false ;
436
436
}
437
437
438
- // / ParseDirectiveProc
438
+ // / parseDirectiveProc
439
439
// / TODO(epastor): Implement parameters and other attributes.
440
440
// / ::= label "proc" [[distance]]
441
441
// / statements
442
442
// / label "endproc"
443
- bool COFFMasmParser::ParseDirectiveProc (StringRef Directive, SMLoc Loc) {
443
+ bool COFFMasmParser::parseDirectiveProc (StringRef Directive, SMLoc Loc) {
444
444
StringRef Label;
445
445
if (getParser ().parseIdentifier (Label))
446
446
return Error (Loc, " expected identifier for procedure" );
@@ -476,7 +476,7 @@ bool COFFMasmParser::ParseDirectiveProc(StringRef Directive, SMLoc Loc) {
476
476
CurrentProceduresFramed.push_back (Framed);
477
477
return false ;
478
478
}
479
- bool COFFMasmParser::ParseDirectiveEndProc (StringRef Directive, SMLoc Loc) {
479
+ bool COFFMasmParser::parseDirectiveEndProc (StringRef Directive, SMLoc Loc) {
480
480
StringRef Label;
481
481
SMLoc LabelLoc = getTok ().getLoc ();
482
482
if (getParser ().parseIdentifier (Label))
@@ -496,7 +496,7 @@ bool COFFMasmParser::ParseDirectiveEndProc(StringRef Directive, SMLoc Loc) {
496
496
return false ;
497
497
}
498
498
499
- bool COFFMasmParser::ParseDirectiveAlias (StringRef Directive, SMLoc Loc) {
499
+ bool COFFMasmParser::parseDirectiveAlias (StringRef Directive, SMLoc Loc) {
500
500
std::string AliasName, ActualName;
501
501
if (getTok ().isNot (AsmToken::Less) ||
502
502
getParser ().parseAngleBracketString (AliasName))
@@ -515,7 +515,7 @@ bool COFFMasmParser::ParseDirectiveAlias(StringRef Directive, SMLoc Loc) {
515
515
return false ;
516
516
}
517
517
518
- bool COFFMasmParser::ParseSEHDirectiveAllocStack (StringRef Directive,
518
+ bool COFFMasmParser::parseSEHDirectiveAllocStack (StringRef Directive,
519
519
SMLoc Loc) {
520
520
int64_t Size ;
521
521
SMLoc SizeLoc = getTok ().getLoc ();
@@ -527,7 +527,7 @@ bool COFFMasmParser::ParseSEHDirectiveAllocStack(StringRef Directive,
527
527
return false ;
528
528
}
529
529
530
- bool COFFMasmParser::ParseSEHDirectiveEndProlog (StringRef Directive,
530
+ bool COFFMasmParser::parseSEHDirectiveEndProlog (StringRef Directive,
531
531
SMLoc Loc) {
532
532
getStreamer ().emitWinCFIEndProlog (Loc);
533
533
return false ;
0 commit comments