diff gen/toobj.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 ad7f2f1862d6
children 8ca25bd765a3
line wrap: on
line diff
--- a/gen/toobj.cpp	Sat Jul 11 13:58:23 2009 +0200
+++ b/gen/toobj.cpp	Sat Jul 11 14:09:33 2009 +0200
@@ -14,9 +14,7 @@
 #include "gen/llvm-version.h"
 #include "llvm/Analysis/Verifier.h"
 #include "llvm/Bitcode/ReaderWriter.h"
-#if LLVM_REV >= 74640
 #include "llvm/LLVMContext.h"
-#endif
 #include "llvm/Module.h"
 #include "llvm/ModuleProvider.h"
 #include "llvm/PassManager.h"
@@ -97,11 +95,7 @@
 
     // create a new ir state
     // TODO look at making the instance static and moving most functionality into IrModule where it belongs
-#if LLVM_REV >= 74640
     IRState ir(new llvm::Module(mname, llvm::getGlobalContext()));
-#else
-    IRState ir(new llvm::Module(mname));
-#endif
     gIR = &ir;
     ir.dmodule = this;
 
@@ -307,15 +301,6 @@
     // Ask the target to add backend passes as necessary.
     MachineCodeEmitter *MCE = 0;
 
-#if LLVM_REV < 70343
-    // Last argument is bool Fast
-    // debug info doesn't work properly without fast!
-    bool LastArg = !optimize() || global.params.symdebug;
-#elif LLVM_REV < 70459
-    // Last argument is unsigned OptLevel
-    // debug info doesn't work properly with OptLevel > 0!
-    unsigned LastArg = global.params.symdebug ? 0 : optLevel();
-#else
     // Last argument is enum CodeGenOpt::Level OptLevel
     // debug info doesn't work properly with OptLevel != None!
     CodeGenOpt::Level LastArg = CodeGenOpt::Default;
@@ -323,7 +308,7 @@
         LastArg = CodeGenOpt::None;
     else if (optLevel() >= 3)
         LastArg = CodeGenOpt::Aggressive;
-#endif
+
     FileModel::Model mod = Target.addPassesToEmitFile(Passes, out, TargetMachine::AssemblyFile, LastArg);
     assert(mod == FileModel::AsmFile);