const sys::Path &llc) {
// Run LLC to convert the bytecode file into assembly code.
std::vector<const char*> args;
+ args.push_back(llc.c_str());
args.push_back("-f");
args.push_back("-o");
args.push_back(OutputFilename.c_str());
/// specified bytecode file.
int llvm::GenerateCFile(const std::string &OutputFile,
const std::string &InputFile,
- const sys::Path &llc ) {
+ const sys::Path &llc) {
// Run LLC to convert the bytecode file into C.
std::vector<const char*> args;
+ args.push_back(llc.c_str());
args.push_back("-march=c");
args.push_back("-f");
args.push_back("-o");
// and linker because we don't know where to put the _start symbol.
// GCC mysteriously knows how to do it.
std::vector<const char*> args;
+ args.push_back(gcc.c_str());
args.push_back("-fno-strict-aliasing");
args.push_back("-O3");
args.push_back("-o");
const sys::Path &llc) {
// Run LLC to convert the bytecode file into assembly code.
std::vector<const char*> args;
- args.push_back( "-f");
- args.push_back( "-o");
- args.push_back( OutputFilename.c_str() );
- args.push_back( InputFilename.c_str() );
+ args.push_back(llc.c_str());
+ args.push_back("-f");
+ args.push_back("-o");
+ args.push_back(OutputFilename.c_str());
+ args.push_back(InputFilename.c_str());
args.push_back(0);
return sys::Program::ExecuteAndWait(llc,&args[0]);
const sys::Path &llc) {
// Run LLC to convert the bytecode file into C.
std::vector<const char*> args;
- args.push_back( "-march=c");
- args.push_back( "-f");
- args.push_back( "-o");
- args.push_back( OutputFile.c_str() );
- args.push_back( InputFile.c_str() );
+ args.push_back(llc.c_str());
+ args.push_back("-march=c");
+ args.push_back("-f");
+ args.push_back("-o");
+ args.push_back(OutputFile.c_str());
+ args.push_back(InputFile.c_str());
args.push_back(0);
return sys::Program::ExecuteAndWait(llc, &args[0]);
}
// and linker because we don't know where to put the _start symbol.
// GCC mysteriously knows how to do it.
std::vector<const char*> args;
+ args.push_back(gcc.c_str());
args.push_back("-fno-strict-aliasing");
args.push_back("-O3");
args.push_back("-o");