summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/ToolRunner.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-18 23:24:41 +0000
committerChris Lattner <sabre@nondot.org>2004-02-18 23:24:41 +0000
commit8d05ebc2f9db6260fdccc57369e29a8d64bb8443 (patch)
treea018e0ca00a817a3504ccab51e2b4c8a444606e7 /llvm/lib/Support/ToolRunner.cpp
parent5e7638409371de564e33da52f25cf794b578482c (diff)
downloadbcm5719-llvm-8d05ebc2f9db6260fdccc57369e29a8d64bb8443.tar.gz
bcm5719-llvm-8d05ebc2f9db6260fdccc57369e29a8d64bb8443.zip
Add support for just running the code generator
llvm-svn: 11611
Diffstat (limited to 'llvm/lib/Support/ToolRunner.cpp')
-rw-r--r--llvm/lib/Support/ToolRunner.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Support/ToolRunner.cpp b/llvm/lib/Support/ToolRunner.cpp
index a15de5e4e6b..6ad3d4392c0 100644
--- a/llvm/lib/Support/ToolRunner.cpp
+++ b/llvm/lib/Support/ToolRunner.cpp
@@ -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,
OpenPOWER on IntegriCloud