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() {
41394139
41404140 // If requested by the target, guess any undefined properties.
41414141 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) {
41454143 if (InstInfo->InferredFrom )
41464144 continue ;
41474145 // The mayLoad and mayStore flags default to false.
41484146 // Conservatively assume hasSideEffects if it wasn't explicit.
41494147 if (InstInfo->hasSideEffects_Unset )
4150- InstInfo->hasSideEffects = true ;
4148+ const_cast <CodeGenInstruction *>( InstInfo) ->hasSideEffects = true ;
41514149 }
41524150 return ;
41534151 }
41544152
41554153 // 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) {
41594155 if (InstInfo->InferredFrom )
41604156 continue ;
41614157 if (InstInfo->hasSideEffects_Unset )
You can’t perform that action at this time.
0 commit comments