xiangzhai / dragonegg

DragonEgg has been migrated to GCC 8 and LLVM 6 but also able to work for GCC 4.8 and LLVM 3.3
https://gcc.gnu.org/ml/gcc/2017-08/msg00245.html
GNU General Public License v2.0
18 stars 6 forks source link

Migrate Reloc::Model RelocModel = Reloc::Default #1

Closed xiangzhai closed 7 years ago

xiangzhai commented 7 years ago

but LLVM >= v3.9 there is no Reloc::Default, right now it was be migrated to:

// The target can set LLVM_SET_RELOC_MODEL to configure the relocation model  
  // used by the LLVM backend.                                                      
  Reloc::Model RelocModel =                                                         
#if LLVM_VERSION_CODE > LLVM_VERSION(3, 8)                                          
      Reloc::Static;                                                                
#else                                                                               
      Reloc::Default;                                                               
#endif                                                                              
#ifdef LLVM_SET_RELOC_MODEL                                                         
  LLVM_SET_RELOC_MODEL(RelocModel);                                                 
#endif