StringOptimization: preserve debug scopes when creating calls to the string initializer

This commit is contained in:
Erik Eckstein
2022-12-21 21:09:20 +01:00
parent cd45058e66
commit 0c6f0bb982

View File

@@ -681,7 +681,7 @@ SILValue StringOptimization::copyValue(SILValue value, SILInstruction *before) {
/// Creates a call to a string initializer.
ApplyInst *StringOptimization::createStringInit(StringRef str,
SILInstruction *beforeInst) {
SILBuilder builder(beforeInst);
SILBuilderWithScope builder(beforeInst);
SILLocation loc = beforeInst->getLoc();
SILModule &module = beforeInst->getFunction()->getModule();
ASTContext &ctxt = module.getASTContext();