Skip to content

Commit fafe81a

Browse files
author
Nathan Hawes
authored
Merge pull request #33165 from nathawes/fix-string-conversion-issue-master-rebranch
[master-rebranch] Fix a StringRef -> std::string conversion failure.
2 parents 0d8e3e1 + 774dfbf commit fafe81a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Transforms/StringOptimization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ bool StringOptimization::optimizeStringAppend(ApplyInst *appendCall,
187187
// Replace lhs.append(rhs) with "lhs = lhs + rhs" if both lhs and rhs are
188188
// constant.
189189
if (lhsString.isConstant() && rhsString.isConstant()) {
190-
std::string concat = lhsString.str;
190+
std::string concat = lhsString.str.str();
191191
concat += rhsString.str;
192192
if (ApplyInst *stringInit = createStringInit(concat, appendCall)) {
193193
replaceAppendWith(appendCall, stringInit, /*copyNewValue*/ false);

0 commit comments

Comments
 (0)