#include "radeon_llvm.h" #include #include #include #include #include #include #include using namespace llvm; static cl::opt InputFilename(cl::Positional, cl::desc(""), cl::init("-")); int main(int argc, char ** argv) { unsigned char * bytes; unsigned byte_count; std::auto_ptr M; LLVMContext &Context = getGlobalContext(); SMDiagnostic Err; cl::ParseCommandLineOptions(argc, argv, "llvm system compiler\n"); M.reset(ParseIRFile(InputFilename, Err, Context)); Module * mod = M.get(); radeon_llvm_compile(wrap(mod), &bytes, &byte_count, "SI", 1); }