File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,13 @@ bool GenericSpecializer::specializeAppliesInFunction(SILFunction &F) {
6464 // Collect the applies for this block in reverse order so that we
6565 // can pop them off the end of our vector and process them in
6666 // forward order.
67- for (auto It = BB.rbegin (), End = BB.rend (); It != End; ++It) {
68- auto *I = &*It;
67+ for (auto &I : llvm::reverse (BB)) {
6968
7069 // Skip non-apply instructions, apply instructions with no
7170 // substitutions, apply instructions where we do not statically
7271 // know the called function, and apply instructions where we do
7372 // not have the body of the called function.
74- ApplySite Apply = ApplySite::isa (I);
73+ ApplySite Apply = ApplySite::isa (& I);
7574 if (!Apply || !Apply.hasSubstitutions ())
7675 continue ;
7776
@@ -81,7 +80,7 @@ bool GenericSpecializer::specializeAppliesInFunction(SILFunction &F) {
8180 if (!Callee->isDefinition ()) {
8281 ORE.emit ([&]() {
8382 using namespace OptRemark ;
84- return RemarkMissed (" NoDef" , * I)
83+ return RemarkMissed (" NoDef" , I)
8584 << " Unable to specialize generic function "
8685 << NV (" Callee" , Callee) << " since definition is not visible" ;
8786 });
You can’t perform that action at this time.
0 commit comments