[llvm-commits] CVS: llvm/lib/Support/ToolRunner.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Oct 14 16:08:02 PDT 2003


Changes in directory llvm/lib/Support:

ToolRunner.cpp updated: 1.3 -> 1.4

---
Log message:

Actually return an error if something bad happens, don't just exit.


---
Diffs of the changes:  (+4 -5)

Index: llvm/lib/Support/ToolRunner.cpp
diff -u llvm/lib/Support/ToolRunner.cpp:1.3 llvm/lib/Support/ToolRunner.cpp:1.4
--- llvm/lib/Support/ToolRunner.cpp:1.3	Mon Oct 13 13:26:49 2003
+++ llvm/lib/Support/ToolRunner.cpp	Tue Oct 14 16:07:25 2003
@@ -306,8 +306,7 @@
   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 @@
   };
   
   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;
 }





More information about the llvm-commits mailing list