diff --git a/llvm/tools/llvm-reduce/llvm-reduce.cpp b/llvm/tools/llvm-reduce/llvm-reduce.cpp --- a/llvm/tools/llvm-reduce/llvm-reduce.cpp +++ b/llvm/tools/llvm-reduce/llvm-reduce.cpp @@ -116,6 +116,10 @@ std::unique_ptr OriginalProgram = parseInputFile(InputFilename, Context); + if (!OriginalProgram) { + return 1; + } + // Initialize test environment TestRunner Tester(TestFilename, TestArguments); Tester.setProgram(std::move(OriginalProgram));