[llvm-commits] CVS: llvm/tools/llvmc/llvmc.cpp 
    Reid Spencer 
    reid at x10sys.com
       
    Sun Aug 29 17:07:03 PDT 2004
    
    
  
Changes in directory llvm/tools/llvmc:
llvmc.cpp updated: 1.11 -> 1.12
---
Log message:
Need to throw std::string not const char* if we want error messages to be
caught.
---
Diffs of the changes:  (+3 -3)
Index: llvm/tools/llvmc/llvmc.cpp
diff -u llvm/tools/llvmc/llvmc.cpp:1.11 llvm/tools/llvmc/llvmc.cpp:1.12
--- llvm/tools/llvmc/llvmc.cpp:1.11	Sun Aug 29 14:26:56 2004
+++ llvm/tools/llvmc/llvmc.cpp	Sun Aug 29 19:06:52 2004
@@ -216,13 +216,13 @@
 
     // Deal with unimplemented options.
     if (PipeCommands)
-      throw "Not implemented yet: -pipe";
+      throw std::string("Not implemented yet: -pipe");
 
     if (OutputFilename.empty())
       if (OptLevel == CompilerDriver::LINKING)
         OutputFilename = "a.out";
       else
-        throw "An output file must be specified. Please use the -o option";
+        throw std::string("An output file must be specified. Please use the -o option");
 
     // Construct the ConfigDataProvider object
     LLVMC_ConfigDataProvider Provider;
@@ -300,7 +300,7 @@
     // Tell the driver to do its thing
     int result = CD->execute(InpList,sys::Path(OutputFilename));
     if (result != 0) {
-      throw "Error executing actions. Terminated.\n";
+      throw std::string("Error executing actions. Terminated.");
       return result;
     }
 
    
    
More information about the llvm-commits
mailing list