Make ToolExecutionError inherit std::exception and implement its
[oota-llvm.git] / tools / llc / llc.cpp
index 24a3a35fc8230b7dbe2bb9b3f84448f48d735b7b..959bdbe36cbec178841434e50e51f5070177db30 100644 (file)
@@ -164,7 +164,11 @@ int main(int argc, char **argv) {
       Out = &std::cout;
     } else {
       OutputFilename = GetFileNameRoot(InputFilename); 
-      OutputFilename += ".s";
+
+      if (Arch != CBackend)
+        OutputFilename += ".s";
+      else
+        OutputFilename += ".cbe.c";
       
       if (!Force && std::ifstream(OutputFilename.c_str())) {
         // If force is not specified, make sure not to overwrite a file!