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 @@ -4925,6 +4925,7 @@ class AssignOrInitInst
4925
4925
ArrayRef<Operand> getAllOperands () const { return Operands.asArray (); }
4926
4926
MutableArrayRef<Operand> getAllOperands () { return Operands.asArray (); }
4927
4927
4928
+ StringRef getPropertyName () const ;
4928
4929
AccessorDecl *getReferencedInitAccessor () const ;
4929
4930
};
4930
4931
Original file line number Diff line number Diff line change @@ -1290,6 +1290,12 @@ bool AssignOrInitInst::isPropertyAlreadyInitialized(unsigned propertyIdx) {
1290
1290
return Assignments.test (propertyIdx);
1291
1291
}
1292
1292
1293
+ StringRef AssignOrInitInst::getPropertyName () const {
1294
+ auto *accessor = getReferencedInitAccessor ();
1295
+ assert (accessor);
1296
+ return cast<VarDecl>(accessor->getStorage ())->getNameStr ();
1297
+ }
1298
+
1293
1299
AccessorDecl *AssignOrInitInst::getReferencedInitAccessor () const {
1294
1300
SILValue initRef = getInitializer ();
1295
1301
SILFunction *accessorFn = nullptr ;
You can’t perform that action at this time.
0 commit comments