@@ -69,7 +69,7 @@ void Enumerate(const Record *R, StringRef N,
69
69
70
70
if (const auto *TypeClass = dyn_cast<DefInit>(Types->getElement (I))) {
71
71
for (const auto *Type :
72
- TypeClass->getDef ()->getValueAsListOfDefs (" Types" )) {
72
+ TypeClass->getDef ()->getValueAsListOfConstDefs (" Types" )) {
73
73
TypePath.push_back (Type);
74
74
Rec (I + 1 , ID + Type->getName ());
75
75
TypePath.pop_back ();
@@ -117,7 +117,7 @@ void ClangOpcodesEmitter::EmitInterp(raw_ostream &OS, StringRef N,
117
117
[this , R, &OS, &N](ArrayRef<const Record *> TS, const Twine &ID) {
118
118
bool CanReturn = R->getValueAsBit (" CanReturn" );
119
119
bool ChangesPC = R->getValueAsBit (" ChangesPC" );
120
- const auto &Args = R->getValueAsListOfDefs (" Args" );
120
+ const auto &Args = R->getValueAsListOfConstDefs (" Args" );
121
121
122
122
OS << " case OP_" << ID << " : {\n " ;
123
123
@@ -176,7 +176,7 @@ void ClangOpcodesEmitter::EmitDisasm(raw_ostream &OS, StringRef N,
176
176
OS << " PrintName(\" " << ID << " \" );\n " ;
177
177
OS << " OS << \"\\ t\" " ;
178
178
179
- for (const auto *Arg : R->getValueAsListOfDefs (" Args" )) {
179
+ for (const auto *Arg : R->getValueAsListOfConstDefs (" Args" )) {
180
180
OS << " << ReadArg<" << Arg->getValueAsString (" Name" ) << " >(P, PC)" ;
181
181
OS << " << \" \" " ;
182
182
}
@@ -194,7 +194,7 @@ void ClangOpcodesEmitter::EmitEmitter(raw_ostream &OS, StringRef N,
194
194
195
195
OS << " #ifdef GET_LINK_IMPL\n " ;
196
196
Enumerate (R, N, [R, &OS](ArrayRef<const Record *>, const Twine &ID) {
197
- const auto &Args = R->getValueAsListOfDefs (" Args" );
197
+ const auto &Args = R->getValueAsListOfConstDefs (" Args" );
198
198
199
199
// Emit the list of arguments.
200
200
OS << " bool ByteCodeEmitter::emit" << ID << " (" ;
@@ -227,7 +227,7 @@ void ClangOpcodesEmitter::EmitEmitter(raw_ostream &OS, StringRef N,
227
227
void ClangOpcodesEmitter::EmitProto (raw_ostream &OS, StringRef N,
228
228
const Record *R) {
229
229
OS << " #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO)\n " ;
230
- auto Args = R->getValueAsListOfDefs (" Args" );
230
+ auto Args = R->getValueAsListOfConstDefs (" Args" );
231
231
Enumerate (R, N, [&OS, &Args](ArrayRef<const Record *> TS, const Twine &ID) {
232
232
OS << " bool emit" << ID << " (" ;
233
233
for (size_t I = 0 , N = Args.size (); I < N; ++I) {
@@ -268,7 +268,7 @@ void ClangOpcodesEmitter::EmitGroup(raw_ostream &OS, StringRef N,
268
268
return ;
269
269
270
270
const auto *Types = R->getValueAsListInit (" Types" );
271
- const auto &Args = R->getValueAsListOfDefs (" Args" );
271
+ const auto &Args = R->getValueAsListOfConstDefs (" Args" );
272
272
273
273
Twine EmitFuncName = " emit" + N;
274
274
@@ -333,7 +333,7 @@ void ClangOpcodesEmitter::EmitGroup(raw_ostream &OS, StringRef N,
333
333
// Print a switch statement selecting T.
334
334
if (auto *TypeClass = dyn_cast<DefInit>(Types->getElement (I))) {
335
335
OS << " switch (T" << I << " ) {\n " ;
336
- auto Cases = TypeClass->getDef ()->getValueAsListOfDefs (" Types" );
336
+ auto Cases = TypeClass->getDef ()->getValueAsListOfConstDefs (" Types" );
337
337
for (auto *Case : Cases) {
338
338
OS << " case PT_" << Case->getName () << " :\n " ;
339
339
TS.push_back (Case);
@@ -364,7 +364,7 @@ void ClangOpcodesEmitter::EmitEval(raw_ostream &OS, StringRef N,
364
364
OS << " #ifdef GET_EVAL_IMPL\n " ;
365
365
Enumerate (R, N,
366
366
[this , R, &N, &OS](ArrayRef<const Record *> TS, const Twine &ID) {
367
- auto Args = R->getValueAsListOfDefs (" Args" );
367
+ auto Args = R->getValueAsListOfConstDefs (" Args" );
368
368
369
369
OS << " bool EvalEmitter::emit" << ID << " (" ;
370
370
for (size_t I = 0 , N = Args.size (); I < N; ++I) {
0 commit comments