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) {
64
64
// Collect the applies for this block in reverse order so that we
65
65
// can pop them off the end of our vector and process them in
66
66
// 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)) {
69
68
70
69
// Skip non-apply instructions, apply instructions with no
71
70
// substitutions, apply instructions where we do not statically
72
71
// know the called function, and apply instructions where we do
73
72
// not have the body of the called function.
74
- ApplySite Apply = ApplySite::isa (I);
73
+ ApplySite Apply = ApplySite::isa (& I);
75
74
if (!Apply || !Apply.hasSubstitutions ())
76
75
continue ;
77
76
@@ -81,7 +80,7 @@ bool GenericSpecializer::specializeAppliesInFunction(SILFunction &F) {
81
80
if (!Callee->isDefinition ()) {
82
81
ORE.emit ([&]() {
83
82
using namespace OptRemark ;
84
- return RemarkMissed (" NoDef" , * I)
83
+ return RemarkMissed (" NoDef" , I)
85
84
<< " Unable to specialize generic function "
86
85
<< NV (" Callee" , Callee) << " since definition is not visible" ;
87
86
});
You can’t perform that action at this time.
0 commit comments