From 9cbbee332f3c4e3531cc8b13d6d8b427034c6a23 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 18 Feb 2004 23:24:41 +0000 Subject: [PATCH] Add support for just running the code generator git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11611 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/ToolRunner.cpp | 12 ++++++++++++ tools/bugpoint/ToolRunner.cpp | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/lib/Support/ToolRunner.cpp b/lib/Support/ToolRunner.cpp index a15de5e4e6b..6ad3d4392c0 100644 --- a/lib/Support/ToolRunner.cpp +++ b/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 &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 &Args, const std::string &InputFile, diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp index a15de5e4e6b..6ad3d4392c0 100644 --- a/tools/bugpoint/ToolRunner.cpp +++ b/tools/bugpoint/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 &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 &Args, const std::string &InputFile,