diff gen/main.cpp @ 1532:c88b16d4a13c

Remove all of the now unecessary #if LLVM_REV
author Benjamin Kramer <benny.kra@gmail.com>
date Sat, 11 Jul 2009 14:09:33 +0200
parents f19adff18813
children d1652c8fb4f6
line wrap: on
line diff
--- a/gen/main.cpp	Sat Jul 11 13:58:23 2009 +0200
+++ b/gen/main.cpp	Sat Jul 11 14:09:33 2009 +0200
@@ -7,17 +7,13 @@
 #include "gen/llvm-version.h"
 #include "llvm/LinkAllVMCore.h"
 #include "llvm/Linker.h"
-#if LLVM_REV >= 74640
 #include "llvm/LLVMContext.h"
-#endif
 #include "llvm/System/Signals.h"
 #include "llvm/Target/SubtargetFeature.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetOptions.h"
 #include "llvm/Target/TargetMachineRegistry.h"
-#if LLVM_REV >= 73610
 #include "llvm/Target/TargetSelect.h"
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -406,11 +402,7 @@
     if (global.errors)
         fatal();
 
-#if LLVM_REV >= 74640
     llvm::Module mod("dummy", llvm::getGlobalContext());
-#else
-    llvm::Module mod("dummy");
-#endif
 
     // override triple if needed
     const char* defaultTriple = DEFAULT_TARGET_TRIPLE;
@@ -439,12 +431,10 @@
     // Allocate target machine.
     
     // first initialize llvm
-#if LLVM_REV >= 73610
 #define LLVM_TARGET(A) LLVMInitialize##A##Target(); LLVMInitialize##A##AsmPrinter();
 // this is defined to be LLVM_TARGET(target name 1) LLVM_TARGET(target name 2) ...
 LDC_TARGETS
 #undef LLVM_TARGET
-#endif
 
     // Check whether the user has explicitly specified an architecture to compile for.
     if (mArch == 0)
@@ -843,16 +833,12 @@
          * not be found at link time.
          */
         if (!global.params.useArrayBounds && !global.params.useAssert)
-#elif LLVM_REV >= 68940
+#else
     // This doesn't play nice with debug info at the moment
     if (!global.params.symdebug && willInline())
     {
         global.params.useAvailableExternally = true;
         Logger::println("Running some extra semantic3's for inlining purposes");
-#else
-    // IN_LLVM, but available_externally not available yet.
-    if (false)
-    {
 #endif
         {
             // Do pass 3 semantic analysis on all imported modules,
@@ -930,11 +916,8 @@
         char* name = m->toChars();
         char* filename = m->objfile->name->str;
         
-#if LLVM_REV >= 74640
         llvm::Linker linker(name, name, llvm::getGlobalContext());
-#else
-        llvm::Linker linker(name, name);
-#endif
+
         std::string errormsg;
         for (int i = 0; i < llvmModules.size(); i++)
         {