Skip to content

Commit 0c6f0bb

Browse files
committed
StringOptimization: preserve debug scopes when creating calls to the string initializer
1 parent cd45058 commit 0c6f0bb

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
@@ -681,7 +681,7 @@ SILValue StringOptimization::copyValue(SILValue value, SILInstruction *before) {
681681
/// Creates a call to a string initializer.
682682
ApplyInst *StringOptimization::createStringInit(StringRef str,
683683
SILInstruction *beforeInst) {
684-
SILBuilder builder(beforeInst);
684+
SILBuilderWithScope builder(beforeInst);
685685
SILLocation loc = beforeInst->getLoc();
686686
SILModule &module = beforeInst->getFunction()->getModule();
687687
ASTContext &ctxt = module.getASTContext();

0 commit comments

Comments
 (0)