diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-10-14 21:07:25 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-10-14 21:07:25 +0000 | 
| commit | 74d64c7d021dbb0bcecbb0b8d40ebe852d613d59 (patch) | |
| tree | 921837ee36939f500b9ff414330a6f6058daba90 /llvm/lib/Support | |
| parent | 6ad91d7166193794419f0f3097ef44a3186fbc1a (diff) | |
| download | bcm5719-llvm-74d64c7d021dbb0bcecbb0b8d40ebe852d613d59.tar.gz bcm5719-llvm-74d64c7d021dbb0bcecbb0b8d40ebe852d613d59.zip | |
Actually return an error if something bad happens, don't just exit.
llvm-svn: 9119
Diffstat (limited to 'llvm/lib/Support')
| -rw-r--r-- | llvm/lib/Support/ToolRunner.cpp | 9 | 
1 files changed, 4 insertions, 5 deletions
| diff --git a/llvm/lib/Support/ToolRunner.cpp b/llvm/lib/Support/ToolRunner.cpp index 4538bb2d570..2fa5b393bbc 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 << "<gcc>" << 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;  } | 

