comparison gen/declarations.cpp @ 1529:ad7f2f1862d6

Adjust LDC to work with the LLVMContext LLVM changes. This means we now require a fairly new LLVM revision. I use 75234.
author Christian Kamm <kamm incasoftware de>
date Fri, 10 Jul 2009 21:30:02 +0200
parents 855f188aab7a
children
comparison
equal deleted inserted replaced
1528:15f1707721fa 1529:ad7f2f1862d6
131 131
132 const LLType* _type = this->ir.irGlobal->type.get(); 132 const LLType* _type = this->ir.irGlobal->type.get();
133 llvm::GlobalValue::LinkageTypes _linkage = DtoLinkage(this); 133 llvm::GlobalValue::LinkageTypes _linkage = DtoLinkage(this);
134 std::string _name(mangle()); 134 std::string _name(mangle());
135 135
136 llvm::GlobalVariable* gvar = new llvm::GlobalVariable(_type,_isconst,_linkage,NULL,_name,gIR->module); 136 llvm::GlobalVariable* gvar = new llvm::GlobalVariable(*gIR->module,_type,_isconst,_linkage,NULL,_name);
137 this->ir.irGlobal->value = gvar; 137 this->ir.irGlobal->value = gvar;
138 138
139 // set the alignment 139 // set the alignment
140 gvar->setAlignment(this->type->alignsize()); 140 gvar->setAlignment(this->type->alignsize());
141 141