comparison gen/main.cpp @ 1347:3647bef175d7

Remove some other code that tested for LLVM before r67588.
author Frits van Bommel <fvbommel wxs.nl>
date Tue, 12 May 2009 16:02:51 +0200
parents b3674ad4026d
children 229e02867307
comparison
equal deleted inserted replaced
1346:6f4154b318ef 1347:3647bef175d7
35 #include "gen/logger.h" 35 #include "gen/logger.h"
36 #include "gen/linker.h" 36 #include "gen/linker.h"
37 #include "gen/irstate.h" 37 #include "gen/irstate.h"
38 #include "gen/toobj.h" 38 #include "gen/toobj.h"
39 #include "gen/passes/Passes.h" 39 #include "gen/passes/Passes.h"
40 #include "gen/llvm-version.h"
41 40
42 #include "gen/cl_options.h" 41 #include "gen/cl_options.h"
43 #include "gen/cl_helpers.h" 42 #include "gen/cl_helpers.h"
44 using namespace opts; 43 using namespace opts;
45 44
879 if(linker.LinkInModule(llvmModules[i], &errormsg)) 878 if(linker.LinkInModule(llvmModules[i], &errormsg))
880 error(errormsg.c_str()); 879 error(errormsg.c_str());
881 delete llvmModules[i]; 880 delete llvmModules[i];
882 } 881 }
883 882
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
894 m->deleteObjFile(); 883 m->deleteObjFile();
895 writeModule(linker.getModule(), filename); 884 writeModule(linker.getModule(), filename);
896 global.params.objfiles->push(filename); 885 global.params.objfiles->push(filename);
897 } 886 }
898 887