From 9915cd9e9f909b2edc175cf674680af651c47fb0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 17 Feb 2004 06:40:06 +0000 Subject: [PATCH] The C backend is no longer in llvm-dis, it's in llc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11533 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/ToolRunner.cpp | 22 +++++++++++----------- tools/bugpoint/ToolRunner.cpp | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lib/Support/ToolRunner.cpp b/lib/Support/ToolRunner.cpp index f81da620eff..3d16a0f827e 100644 --- a/lib/Support/ToolRunner.cpp +++ b/lib/Support/ToolRunner.cpp @@ -215,19 +215,19 @@ int CBE::OutputC(const std::string &Bytecode, 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 << "" << 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 @@ int CBE::ExecuteProgram(const std::string &Bytecode, const std::vector &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 @@ int CBE::ExecuteProgram(const std::string &Bytecode, 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); } //===---------------------------------------------------------------------===// diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp index f81da620eff..3d16a0f827e 100644 --- a/tools/bugpoint/ToolRunner.cpp +++ b/tools/bugpoint/ToolRunner.cpp @@ -215,19 +215,19 @@ int CBE::OutputC(const std::string &Bytecode, 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 << "" << 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 @@ int CBE::ExecuteProgram(const std::string &Bytecode, const std::vector &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 @@ int CBE::ExecuteProgram(const std::string &Bytecode, 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); } //===---------------------------------------------------------------------===// -- 2.34.1