-GlobalVariable::GlobalVariable(const Type *Ty, bool constant, LinkageTypes Link,
- Constant *InitVal, const std::string &Name,
- Module *ParentModule, bool ThreadLocal)
- : GlobalValue(PointerType::get(Ty), Value::GlobalVariableVal,
- &Initializer, InitVal != 0, Link, Name),
+GlobalVariable::GlobalVariable(LLVMContext &Context, const Type *Ty,
+ bool constant, LinkageTypes Link,
+ Constant *InitVal, const Twine &Name,
+ bool ThreadLocal, unsigned AddressSpace)
+ : GlobalValue(PointerType::get(Ty, AddressSpace),
+ Value::GlobalVariableVal,
+ OperandTraits<GlobalVariable>::op_begin(this),
+ InitVal != 0, Link, Name),