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
This commit is contained in:
Chris Lattner 2004-02-18 23:24:41 +00:00
parent f03715c6a8
commit 9cbbee332f
2 changed files with 24 additions and 0 deletions

View 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,

View 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,