radeon/llvm: Only initialize the AMDGPU target

This commit is contained in:
Tom Stellard
2012-10-01 21:01:06 +00:00
parent cbd09a9e5c
commit f2f17fc348

View File

@@ -86,17 +86,11 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes,
Triple AMDGPUTriple(sys::getDefaultTargetTriple());
#ifdef EXTERNAL_LLVM
/* XXX: Can we just initialize the AMDGPU target here? */
InitializeAllTargets();
InitializeAllTargetMCs();
InitializeAllAsmPrinters();
#else
LLVMInitializeAMDGPUTargetInfo();
LLVMInitializeAMDGPUTarget();
LLVMInitializeAMDGPUTargetMC();
LLVMInitializeAMDGPUAsmPrinter();
#endif
std::string err;
const Target * AMDGPUTarget = TargetRegistry::lookupTarget("r600", err);
if(!AMDGPUTarget) {