File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -158,17 +158,14 @@ struct SILDynamicCastInst {
158
158
SILDynamicCastInst (ID *i) : inst(i) {}
159
159
#include " swift/SIL/SILNodes.def"
160
160
161
- static SILDynamicCastInst getAs (SILNode *node) {
162
- auto *i = dyn_cast<SILInstruction>(node);
163
- if (!i)
164
- return SILDynamicCastInst ();
165
- auto kind = SILDynamicCastKind::fromNodeKind (i->getKind ());
161
+ static SILDynamicCastInst getAs (SILInstruction *inst) {
162
+ auto kind = SILDynamicCastKind::fromNodeKind (inst->getKind ());
166
163
if (!kind)
167
164
return SILDynamicCastInst ();
168
165
switch (kind.getValue ()) {
169
166
#define DYNAMICCAST_INST (ID, PARENT ) \
170
167
case SILDynamicCastKind::ID: \
171
- return SILDynamicCastInst (cast<ID>(node ));
168
+ return SILDynamicCastInst (cast<ID>(inst ));
172
169
#include " swift/SIL/SILNodes.def"
173
170
}
174
171
}
You can’t perform that action at this time.
0 commit comments