File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
llvm/utils/TableGen/Common Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -4139,23 +4139,19 @@ void CodeGenDAGPatterns::InferInstructionFlags() {
4139
4139
4140
4140
// If requested by the target, guess any undefined properties.
4141
4141
if (Target.guessInstructionProperties ()) {
4142
- for (unsigned i = 0 , e = Instructions.size (); i != e; ++i) {
4143
- CodeGenInstruction *InstInfo =
4144
- const_cast <CodeGenInstruction *>(Instructions[i]);
4142
+ for (const CodeGenInstruction *InstInfo : Instructions) {
4145
4143
if (InstInfo->InferredFrom )
4146
4144
continue ;
4147
4145
// The mayLoad and mayStore flags default to false.
4148
4146
// Conservatively assume hasSideEffects if it wasn't explicit.
4149
4147
if (InstInfo->hasSideEffects_Unset )
4150
- InstInfo->hasSideEffects = true ;
4148
+ const_cast <CodeGenInstruction *>( InstInfo) ->hasSideEffects = true ;
4151
4149
}
4152
4150
return ;
4153
4151
}
4154
4152
4155
4153
// Complain about any flags that are still undefined.
4156
- for (unsigned i = 0 , e = Instructions.size (); i != e; ++i) {
4157
- CodeGenInstruction *InstInfo =
4158
- const_cast <CodeGenInstruction *>(Instructions[i]);
4154
+ for (const CodeGenInstruction *InstInfo : Instructions) {
4159
4155
if (InstInfo->InferredFrom )
4160
4156
continue ;
4161
4157
if (InstInfo->hasSideEffects_Unset )
You can’t perform that action at this time.
0 commit comments