unsigned * byte_count, const char * gpu_family,
unsigned dump) {
-#if HAVE_LLVM > 0x0300
Triple AMDGPUTriple(sys::getDefaultTargetTriple());
-#else
- Triple AMDGPUTriple(sys::getHostTriple());
-#endif
-
#ifdef EXTERNAL_LLVM
/* XXX: Can we just initialize the AMDGPU target here? */
Module * mod = unwrap(M);
std::string FS = gpu_family;
-#if HAVE_LLVM > 0x0300
TargetOptions TO;
-#endif
std::auto_ptr<TargetMachine> tm(AMDGPUTarget->createTargetMachine(
AMDGPUTriple.getTriple(), gpu_family, "" /* Features */,
/* Optional extra paramater true / false to disable verify */
if (AMDGPUTargetMachine.addPassesToEmitFile(PM, out, TargetMachine::CGFT_AssemblyFile,
-#if HAVE_LLVM <= 0x300
- CodeGenOpt::Default,
-#endif
true)){
fprintf(stderr, "AddingPasses failed.\n");
return 1;