diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index ce1ce5d68c137..ad31a0ec63387 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -355,13 +355,11 @@ static std::unique_ptr GetOutputStream(Triple::OSType OS) { if (!Binary) OpenFlags |= sys::fs::OF_TextWithCRLF; auto FDOut = std::make_unique(OutputFilename, EC, OpenFlags); - if (EC) { + if (EC) reportError(EC.message()); - return nullptr; - } - return FDOut; } + // main - Entry point for the llc compiler. // int main(int argc, char **argv) {