Add support for just running the code generator
authorChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2004 23:24:41 +0000 (23:24 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2004 23:24:41 +0000 (23:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11611 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/ToolRunner.cpp
tools/bugpoint/ToolRunner.cpp

index a15de5e4e6b819369f4c713ee9dd87dc15f01387..6ad3d4392c0a6295f09c5709670b5d3d3b029ce8 100644 (file)
@@ -126,6 +126,12 @@ void LLC::OutputAsm(const std::string &Bytecode, std::string &OutputAsmFile) {
     ProcessFailure(LLCPath, LLCArgs);
 }
 
+void LLC::compileProgram(const std::string &Bytecode) {
+  std::string OutputAsmFile;
+  OutputAsm(Bytecode, OutputAsmFile);
+  removeFile(OutputAsmFile);
+}
+
 int LLC::ExecuteProgram(const std::string &Bytecode,
                         const std::vector<std::string> &Args,
                         const std::string &InputFile,
@@ -243,6 +249,12 @@ void CBE::OutputC(const std::string &Bytecode,
     ProcessFailure(LLCPath, LLCArgs);
 }
 
+void CBE::compileProgram(const std::string &Bytecode) {
+  std::string OutputCFile;
+  OutputC(Bytecode, OutputCFile);
+  removeFile(OutputCFile);
+}
+
 int CBE::ExecuteProgram(const std::string &Bytecode,
                         const std::vector<std::string> &Args,
                         const std::string &InputFile,
index a15de5e4e6b819369f4c713ee9dd87dc15f01387..6ad3d4392c0a6295f09c5709670b5d3d3b029ce8 100644 (file)
@@ -126,6 +126,12 @@ void LLC::OutputAsm(const std::string &Bytecode, std::string &OutputAsmFile) {
     ProcessFailure(LLCPath, LLCArgs);
 }
 
+void LLC::compileProgram(const std::string &Bytecode) {
+  std::string OutputAsmFile;
+  OutputAsm(Bytecode, OutputAsmFile);
+  removeFile(OutputAsmFile);
+}
+
 int LLC::ExecuteProgram(const std::string &Bytecode,
                         const std::vector<std::string> &Args,
                         const std::string &InputFile,
@@ -243,6 +249,12 @@ void CBE::OutputC(const std::string &Bytecode,
     ProcessFailure(LLCPath, LLCArgs);
 }
 
+void CBE::compileProgram(const std::string &Bytecode) {
+  std::string OutputCFile;
+  OutputC(Bytecode, OutputCFile);
+  removeFile(OutputCFile);
+}
+
 int CBE::ExecuteProgram(const std::string &Bytecode,
                         const std::vector<std::string> &Args,
                         const std::string &InputFile,