File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -4988,6 +4988,7 @@ class AssignOrInitInst
4988
4988
ArrayRef<Operand> getAllOperands () const { return Operands.asArray (); }
4989
4989
MutableArrayRef<Operand> getAllOperands () { return Operands.asArray (); }
4990
4990
4991
+ StringRef getPropertyName () const ;
4991
4992
AccessorDecl *getReferencedInitAccessor () const ;
4992
4993
};
4993
4994
Original file line number Diff line number Diff line change @@ -1283,6 +1283,12 @@ bool AssignOrInitInst::isPropertyAlreadyInitialized(unsigned propertyIdx) {
1283
1283
return Assignments.test (propertyIdx);
1284
1284
}
1285
1285
1286
+ StringRef AssignOrInitInst::getPropertyName () const {
1287
+ auto *accessor = getReferencedInitAccessor ();
1288
+ assert (accessor);
1289
+ return cast<VarDecl>(accessor->getStorage ())->getNameStr ();
1290
+ }
1291
+
1286
1292
AccessorDecl *AssignOrInitInst::getReferencedInitAccessor () const {
1287
1293
SILValue initRef = getInitializer ();
1288
1294
SILFunction *accessorFn = nullptr ;
You can’t perform that action at this time.
0 commit comments