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

Chris Lattner lattner at cs.uiuc.edu
Tue Feb 17 00:41:26 PST 2004


Changes in directory llvm/lib/Support:

ToolRunner.cpp updated: 1.14 -> 1.15

---
Log message:

The C backend is no longer in llvm-dis, it's in llc


---
Diffs of the changes:  (+11 -11)

Index: llvm/lib/Support/ToolRunner.cpp
diff -u llvm/lib/Support/ToolRunner.cpp:1.14 llvm/lib/Support/ToolRunner.cpp:1.15
--- llvm/lib/Support/ToolRunner.cpp:1.14	Mon Jan 26 14:59:33 2004
+++ llvm/lib/Support/ToolRunner.cpp	Tue Feb 17 00:40:06 2004
@@ -215,19 +215,19 @@
                  std::string &OutputCFile) {
   OutputCFile = getUniqueFilename(Bytecode+".cbe.c");
   const char *DisArgs[] = {
-    DISPath.c_str(),
+    LLCPath.c_str(),
     "-o", OutputCFile.c_str(),   // Output to the C file
-    "-c",                        // Output to C
+    "-march=c",                  // Output to C
     "-f",                        // Overwrite as necessary...
     Bytecode.c_str(),            // This is the input bytecode
     0
   };
 
   std::cout << "<cbe>" << std::flush;
-  if (RunProgramWithTimeout(DISPath, DisArgs, "/dev/null", "/dev/null",
+  if (RunProgramWithTimeout(LLCPath, DisArgs, "/dev/null", "/dev/null",
                             "/dev/null")) {                            
     // If dis failed on the bytecode, print error...
-    std::cerr << "Error: `llvm-dis -c' failed!\n";
+    std::cerr << "Error: `llc -march=c' failed!\n";
     return 1;
   }
 
@@ -241,7 +241,7 @@
                         const std::vector<std::string> &SharedLibs) {
   std::string OutputCFile;
   if (OutputC(Bytecode, OutputCFile)) {
-    std::cerr << "Could not generate C code with `llvm-dis', exiting.\n";
+    std::cerr << "Could not generate C code with `llc', exiting.\n";
     exit(1);
   }
 
@@ -252,24 +252,24 @@
   return Result;
 }
 
-/// createCBE - Try to find the 'llvm-dis' executable
+/// createCBE - Try to find the 'llc' executable
 ///
 CBE *AbstractInterpreter::createCBE(const std::string &ProgramPath,
                                     std::string &Message) {
-  std::string DISPath = FindExecutable("llvm-dis", ProgramPath);
-  if (DISPath.empty()) {
+  std::string LLCPath = FindExecutable("llc", ProgramPath);
+  if (LLCPath.empty()) {
     Message = 
-      "Cannot find `llvm-dis' in executable directory or PATH!\n";
+      "Cannot find `llc' in executable directory or PATH!\n";
     return 0;
   }
 
-  Message = "Found llvm-dis: " + DISPath + "\n";
+  Message = "Found llc: " + LLCPath + "\n";
   GCC *gcc = GCC::create(ProgramPath, Message);
   if (!gcc) {
     std::cerr << Message << "\n";
     exit(1);
   }
-  return new CBE(DISPath, gcc);
+  return new CBE(LLCPath, gcc);
 }
 
 //===---------------------------------------------------------------------===//





More information about the llvm-commits mailing list