@@ -34,12 +34,12 @@ class CallingConvEmitter {
34
34
public:
35
35
explicit CallingConvEmitter (const RecordKeeper &R) : Records(R) {}
36
36
37
- void run (raw_ostream &o );
37
+ void run (raw_ostream &O );
38
38
39
39
private:
40
- void EmitCallingConv (const Record *CC, raw_ostream &O);
41
- void EmitAction (const Record *Action, indent Indent, raw_ostream &O);
42
- void EmitArgRegisterLists (raw_ostream &O);
40
+ void emitCallingConv (const Record *CC, raw_ostream &O);
41
+ void emitAction (const Record *Action, indent Indent, raw_ostream &O);
42
+ void emitArgRegisterLists (raw_ostream &O);
43
43
};
44
44
} // End anonymous namespace
45
45
@@ -74,16 +74,16 @@ void CallingConvEmitter::run(raw_ostream &O) {
74
74
Records.startTimer (" Emit full descriptions" );
75
75
for (const Record *CC : CCs) {
76
76
if (!CC->getValueAsBit (" Custom" )) {
77
- EmitCallingConv (CC, O);
77
+ emitCallingConv (CC, O);
78
78
}
79
79
}
80
80
81
- EmitArgRegisterLists (O);
81
+ emitArgRegisterLists (O);
82
82
83
83
O << " \n #endif // CC_REGISTER_LIST\n " ;
84
84
}
85
85
86
- void CallingConvEmitter::EmitCallingConv (const Record *CC, raw_ostream &O) {
86
+ void CallingConvEmitter::emitCallingConv (const Record *CC, raw_ostream &O) {
87
87
const ListInit *CCActions = CC->getValueAsListInit (" Actions" );
88
88
Counter = 0 ;
89
89
@@ -106,8 +106,8 @@ void CallingConvEmitter::EmitCallingConv(const Record *CC, raw_ostream &O) {
106
106
<< std::string (Pad, ' ' ) << " MVT LocVT, CCValAssign::LocInfo LocInfo,\n "
107
107
<< std::string (Pad, ' ' ) << " ISD::ArgFlagsTy ArgFlags, CCState &State) {\n " ;
108
108
// Emit all of the actions, in order.
109
- for (unsigned i = 0 , e = CCActions->size (); i != e ; ++i ) {
110
- const Record *Action = CCActions->getElementAsRecord (i );
109
+ for (unsigned I = 0 , E = CCActions->size (); I != E ; ++I ) {
110
+ const Record *Action = CCActions->getElementAsRecord (I );
111
111
SwiftAction =
112
112
llvm::any_of (Action->getSuperClasses (),
113
113
[](const std::pair<const Record *, SMRange> &Class) {
@@ -116,23 +116,23 @@ void CallingConvEmitter::EmitCallingConv(const Record *CC, raw_ostream &O) {
116
116
});
117
117
118
118
O << " \n " ;
119
- EmitAction (Action, indent (2 ), O);
119
+ emitAction (Action, indent (2 ), O);
120
120
}
121
121
122
122
O << " \n return true; // CC didn't match.\n " ;
123
123
O << " }\n " ;
124
124
}
125
125
126
- void CallingConvEmitter::EmitAction (const Record *Action, indent Indent,
126
+ void CallingConvEmitter::emitAction (const Record *Action, indent Indent,
127
127
raw_ostream &O) {
128
128
if (Action->isSubClassOf (" CCPredicateAction" )) {
129
129
O << Indent << " if (" ;
130
130
131
131
if (Action->isSubClassOf (" CCIfType" )) {
132
132
const ListInit *VTs = Action->getValueAsListInit (" VTs" );
133
- for (unsigned i = 0 , e = VTs->size (); i != e ; ++i ) {
134
- const Record *VT = VTs->getElementAsRecord (i );
135
- if (i != 0 )
133
+ for (unsigned I = 0 , E = VTs->size (); I != E ; ++I ) {
134
+ const Record *VT = VTs->getElementAsRecord (I );
135
+ if (I != 0 )
136
136
O << " ||\n " << Indent;
137
137
O << " LocVT == " << getEnumName (getValueType (VT));
138
138
}
@@ -145,7 +145,7 @@ void CallingConvEmitter::EmitAction(const Record *Action, indent Indent,
145
145
}
146
146
147
147
O << " ) {\n " ;
148
- EmitAction (Action->getValueAsDef (" SubAction" ), Indent + 2 , O);
148
+ emitAction (Action->getValueAsDef (" SubAction" ), Indent + 2 , O);
149
149
O << Indent << " }\n " ;
150
150
} else {
151
151
if (Action->isSubClassOf (" CCDelegateTo" )) {
@@ -170,8 +170,8 @@ void CallingConvEmitter::EmitAction(const Record *Action, indent Indent,
170
170
<< " [] = {\n " ;
171
171
O << Indent << " " ;
172
172
ListSeparator LS;
173
- for (unsigned i = 0 , e = RegList->size (); i != e ; ++i ) {
174
- std::string Name = getQualifiedName (RegList->getElementAsRecord (i ));
173
+ for (unsigned I = 0 , E = RegList->size (); I != E ; ++I ) {
174
+ std::string Name = getQualifiedName (RegList->getElementAsRecord (I ));
175
175
if (SwiftAction)
176
176
AssignedSwiftRegsMap[CurrentAction].insert (Name);
177
177
else
@@ -229,16 +229,16 @@ void CallingConvEmitter::EmitAction(const Record *Action, indent Indent,
229
229
<< " [] = {\n " ;
230
230
O << Indent << " " ;
231
231
ListSeparator LS;
232
- for (unsigned i = 0 , e = RegList->size (); i != e ; ++i )
233
- O << LS << getQualifiedName (RegList->getElementAsRecord (i ));
232
+ for (unsigned I = 0 , E = RegList->size (); I != E ; ++I )
233
+ O << LS << getQualifiedName (RegList->getElementAsRecord (I ));
234
234
O << " \n " << Indent << " };\n " ;
235
235
236
236
O << Indent << " static const MCPhysReg RegList" << ShadowRegListNumber
237
237
<< " [] = {\n " ;
238
238
O << Indent << " " ;
239
239
ListSeparator LSS;
240
- for (unsigned i = 0 , e = ShadowRegList->size (); i != e ; ++i )
241
- O << LSS << getQualifiedName (ShadowRegList->getElementAsRecord (i ));
240
+ for (unsigned I = 0 , E = ShadowRegList->size (); I != E ; ++I )
241
+ O << LSS << getQualifiedName (ShadowRegList->getElementAsRecord (I ));
242
242
O << " \n " << Indent << " };\n " ;
243
243
244
244
O << Indent << " if (MCRegister Reg = State.AllocateReg(RegList"
@@ -286,8 +286,8 @@ void CallingConvEmitter::EmitAction(const Record *Action, indent Indent,
286
286
<< ShadowRegListNumber << " [] = {\n " ;
287
287
O << Indent << " " ;
288
288
ListSeparator LS;
289
- for (unsigned i = 0 , e = ShadowRegList->size (); i != e ; ++i )
290
- O << LS << getQualifiedName (ShadowRegList->getElementAsRecord (i ));
289
+ for (unsigned I = 0 , E = ShadowRegList->size (); I != E ; ++I )
290
+ O << LS << getQualifiedName (ShadowRegList->getElementAsRecord (I ));
291
291
O << " \n " << Indent << " };\n " ;
292
292
293
293
O << Indent << " int64_t Offset" << ++Counter << " = State.AllocateStack("
@@ -356,7 +356,7 @@ void CallingConvEmitter::EmitAction(const Record *Action, indent Indent,
356
356
}
357
357
}
358
358
359
- void CallingConvEmitter::EmitArgRegisterLists (raw_ostream &O) {
359
+ void CallingConvEmitter::emitArgRegisterLists (raw_ostream &O) {
360
360
// Transitively merge all delegated CCs into AssignedRegsMap.
361
361
using EntryTy = std::pair<std::string, std::set<std::string>>;
362
362
bool Redo;
0 commit comments