#include <sstream>
using namespace llvm;
+ToolExecutionError::~ToolExecutionError() throw() { }
+
static void ProcessFailure(std::string ProgPath, const char** Args) {
std::ostringstream OS;
OS << "\nError running tool:\n ";
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,
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,