Skip to content

Commit aef3508

Browse files
vzakharitru
authored andcommitted
[flang] Fixed uninitialized std::unique_ptr dereference.
This fixes unittest failures reported in D142279: flang-Unit :: Frontend/./FlangFrontendTests/5/7 flang-Unit :: Frontend/./FlangFrontendTests/6/7 (cherry picked from commit e054e0d)
1 parent fbf716f commit aef3508

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Frontend/FrontendActions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ void CodeGenAction::executeAction() {
779779
llvmModule->setDataLayout(tm->createDataLayout());
780780

781781
// Run LLVM's middle-end (i.e. the optimizer).
782-
runOptimizationPipeline(*os);
782+
runOptimizationPipeline(ci.isOutputStreamNull() ? *os : ci.getOutputStream());
783783

784784
if (action == BackendActionTy::Backend_EmitLL) {
785785
llvmModule->print(ci.isOutputStreamNull() ? *os : ci.getOutputStream(),

0 commit comments

Comments
 (0)