diff --git a/llvm/lib/Support/ToolRunner.cpp b/llvm/lib/Support/ToolRunner.cpp index 4538bb2d5707..2fa5b393bbc3 100644 --- a/llvm/lib/Support/ToolRunner.cpp +++ b/llvm/lib/Support/ToolRunner.cpp @@ -306,8 +306,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile, return ProgramResult; } -int GCC::MakeSharedObject(const std::string &InputFile, - FileType fileType, +int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType, std::string &OutputFile) { OutputFile = getUniqueFilename(InputFile+".so"); // Compile the C/asm file into a shared object @@ -327,10 +326,10 @@ int GCC::MakeSharedObject(const std::string &InputFile, }; std::cout << "" << std::flush; - if(RunProgramWithTimeout(GCCPath, GCCArgs, "/dev/null", "/dev/null", - "/dev/null")) { + if (RunProgramWithTimeout(GCCPath, GCCArgs, "/dev/null", "/dev/null", + "/dev/null")) { ProcessFailure(GCCArgs); - exit(1); + return 1; } return 0; }