Skip to content

Commit a7f8f89

Browse files
authored
Merge pull request swiftlang#20696 from compnerd/orders
2 parents 8e00b71 + 19a76ea commit a7f8f89

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,10 +1261,12 @@ static bool performCompileStepsPostSILGen(
12611261

12621262
std::unique_ptr<llvm::raw_fd_ostream> OptRecordFile =
12631263
createOptRecordFile(SILOpts.OptRecordFile, Instance.getDiags());
1264-
if (OptRecordFile)
1265-
SM->setOptRecordStream(llvm::make_unique<llvm::yaml::Output>(
1266-
*OptRecordFile, &Instance.getSourceMgr()),
1267-
std::move(OptRecordFile));
1264+
if (OptRecordFile) {
1265+
auto Output =
1266+
llvm::make_unique<llvm::yaml::Output>(*OptRecordFile,
1267+
&Instance.getSourceMgr());
1268+
SM->setOptRecordStream(std::move(Output), std::move(OptRecordFile));
1269+
}
12681270

12691271
if (performMandatorySILPasses(Invocation, SM.get(), observer))
12701272
return true;

0 commit comments

Comments
 (0)