Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Changeset 1347:3647bef175d7

Show
Ignore:
Timestamp:
05/12/09 10:02:51 (3 years ago)
Author:
Frits van Bommel <fvbommel wxs.nl>
branch:
default
Message:

Remove some other code that tested for LLVM before r67588.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gen/linkage.h

    r1113 r1347  
    22#define LDC_GEN_LINKAGE_H 
    33 
    4 #include "gen/llvm-version.h" 
     4// Make it easier to test new linkage types 
    55 
    6 // Make it easier to test new linkage types 
    7 // Also used to adapt to some changes in LLVM between 2.5 and 2.6 
    8  
    9  
    10 // LLVM r66339 introduces LinkOnceODRLinkage, which is just what we want here. 
    11 // (It also renamed LinkOnceLinkage, so this #if is needed for LDC to compile 
    12 // with both 2.5 and trunk) 
    13 #if LLVM_REV >= 66339 
    146#  define TEMPLATE_LINKAGE_TYPE         llvm::GlobalValue::LinkOnceODRLinkage 
    157#  define TYPEINFO_LINKAGE_TYPE         llvm::GlobalValue::LinkOnceODRLinkage 
     
    1810                                        llvm::GlobalValue::LinkOnceAnyLinkage 
    1911 
    20 // For 2.5 and any LLVM revision before 66339 we want to use LinkOnceLinkage 
    21 // It's equivalent to LinkOnceAnyLinkage in trunk except that the inliner had a 
    22 // hack (removed in r66339) to allow inlining of templated functions even though 
    23 // LinkOnce doesn't technically allow that. 
    24 #else 
    25 #  define TEMPLATE_LINKAGE_TYPE         llvm::GlobalValue::LinkOnceLinkage 
    26 #  define TYPEINFO_LINKAGE_TYPE         llvm::GlobalValue::LinkOnceLinkage 
    27 #  define DEBUGINFO_LINKONCE_LINKAGE_TYPE \ 
    28                                         llvm::GlobalValue::LinkOnceLinkage 
    29 #endif 
    3012 
    3113#endif 
  • gen/main.cpp

    r1324 r1347  
    3838#include "gen/toobj.h" 
    3939#include "gen/passes/Passes.h" 
    40 #include "gen/llvm-version.h" 
    4140 
    4241#include "gen/cl_options.h" 
     
    882881        } 
    883882         
    884 #if LLVM_REV < 66404 
    885         // Workaround for llvm bug #3749 
    886         // Not needed since LLVM r66404 (it no longer checks for this) 
    887         llvm::GlobalVariable* ctors = linker.getModule()->getGlobalVariable("llvm.global_ctors"); 
    888         if (ctors) { 
    889             ctors->removeDeadConstantUsers(); 
    890             assert(ctors->use_empty()); 
    891         } 
    892 #endif 
    893          
    894883        m->deleteObjFile(); 
    895884        writeModule(linker.getModule(), filename); 
  • gen/tollvm.cpp

    r1323 r1347  
    544544    else if(llty == LLType::X86_FP80Ty) { 
    545545        uint64_t bits[] = {0, 0}; 
    546     #if LLVM_REV < 67562 
    547         // Prior to r67562, the i80 APInt format expected by the APFloat 
    548         // constructor was different than the memory layout on the actual 
    549         // processor. 
    550         bits[1] = *(uint16_t*)&value; 
    551         bits[0] = *(uint64_t*)((uint16_t*)&value + 1); 
    552     #else 
    553546        bits[0] = *(uint64_t*)&value; 
    554547        bits[1] = *(uint16_t*)((uint64_t*)&value + 1); 
    555     #endif 
    556548        return LLConstantFP::get(APFloat(APInt(80, 2, bits))); 
    557549    } else { 
Copyright © 2008, LDC Development Team.