radeon: Remove HAVE_LLVM ifdefs
authorTom Stellard <thomas.stellard@amd.com>
Mon, 16 Apr 2012 21:47:04 +0000 (17:47 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 23 Apr 2012 12:53:48 +0000 (08:53 -0400)
Only LLVM 3.1 is supported, so these are not necessary.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/radeon/radeon_llvm_emit.cpp

index 1bc6a15610a004bf893aab8061c34e6b36cb3cd8..04fd6dd6b368b7793d62f84a2cbdd40da0053927 100644 (file)
@@ -68,12 +68,7 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes,
                  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? */
@@ -100,9 +95,7 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes,
 
    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 */,
@@ -125,9 +118,6 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes,
 
    /* 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;