@@ -650,7 +650,8 @@ void LifetimeChecker::noteUninitializedMembers(const DIMemoryUse &Use) {
650
650
if (Decl && !Decl->isImplicit ())
651
651
Loc = SILLocation (Decl);
652
652
653
- diagnose (Module, Loc, diag::stored_property_not_initialized, Name);
653
+ diagnose (Module, Loc, diag::stored_property_not_initialized,
654
+ StringRef (Name));
654
655
}
655
656
}
656
657
@@ -707,7 +708,7 @@ void LifetimeChecker::diagnoseInitError(const DIMemoryUse &Use,
707
708
for (unsigned i = 0 , e = Use.NumElements ; i != e; ++i)
708
709
isLet &= TheMemory.isElementLetProperty (i);
709
710
710
- diagnose (Module, DiagLoc, DiagMessage, Name, isLet);
711
+ diagnose (Module, DiagLoc, DiagMessage, StringRef ( Name) , isLet);
711
712
712
713
// As a debugging hack, print the instruction itself if there is no location
713
714
// information. This should never happen.
@@ -1164,10 +1165,10 @@ void LifetimeChecker::handleInOutUse(const DIMemoryUse &Use) {
1164
1165
FD->getName (), /* method*/ 0 , PropertyName);
1165
1166
} else if (isAssignment) {
1166
1167
diagnose (Module, Use.Inst ->getLoc (),
1167
- diag::assignment_to_immutable_value, PropertyName);
1168
+ diag::assignment_to_immutable_value, StringRef ( PropertyName) );
1168
1169
} else {
1169
1170
diagnose (Module, Use.Inst ->getLoc (),
1170
- diag::immutable_value_passed_inout, PropertyName);
1171
+ diag::immutable_value_passed_inout, StringRef ( PropertyName) );
1171
1172
}
1172
1173
1173
1174
if (auto *Var = dyn_cast<VarDecl>(VD)) {
0 commit comments