forked from OSchip/llvm-project
Add support for just running the code generator
llvm-svn: 11611
This commit is contained in:
parent
5e76384093
commit
8d05ebc2f9
|
@ -126,6 +126,12 @@ void LLC::OutputAsm(const std::string &Bytecode, std::string &OutputAsmFile) {
|
||||||
ProcessFailure(LLCPath, LLCArgs);
|
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,
|
int LLC::ExecuteProgram(const std::string &Bytecode,
|
||||||
const std::vector<std::string> &Args,
|
const std::vector<std::string> &Args,
|
||||||
const std::string &InputFile,
|
const std::string &InputFile,
|
||||||
|
@ -243,6 +249,12 @@ void CBE::OutputC(const std::string &Bytecode,
|
||||||
ProcessFailure(LLCPath, LLCArgs);
|
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,
|
int CBE::ExecuteProgram(const std::string &Bytecode,
|
||||||
const std::vector<std::string> &Args,
|
const std::vector<std::string> &Args,
|
||||||
const std::string &InputFile,
|
const std::string &InputFile,
|
||||||
|
|
Loading…
Reference in New Issue