Fix some bugs with the handling of indices in insertvalue/extractvalue.
[oota-llvm.git] / lib / VMCore / Globals.cpp
index 229b0127a4a4dfd0d864b17f63b4deb60ee63e14..7340f1532f536c4278df179316f968437b123188 100644 (file)
@@ -104,7 +104,7 @@ GlobalVariable::GlobalVariable(const Type *Ty, bool constant, LinkageTypes Link,
   if (InitVal) {
     assert(InitVal->getType() == Ty &&
            "Initializer should be the same type as the GlobalVariable!");
-    Op<0>().init(InitVal, this);
+    Op<0>() = InitVal;
   }
 
   LeakDetector::addGarbageObject(this);
@@ -124,7 +124,7 @@ GlobalVariable::GlobalVariable(const Type *Ty, bool constant, LinkageTypes Link,
   if (InitVal) {
     assert(InitVal->getType() == Ty &&
            "Initializer should be the same type as the GlobalVariable!");
-    Op<0>().init(InitVal, this);
+    Op<0>() = InitVal;
   }
   
   LeakDetector::addGarbageObject(this);
@@ -191,7 +191,7 @@ GlobalAlias::GlobalAlias(const Type *Ty, LinkageTypes Link,
 
   if (aliasee)
     assert(aliasee->getType() == Ty && "Alias and aliasee types should match!");
-  Op<0>().init(aliasee, this);
+  Op<0>() = aliasee;
 
   if (ParentModule)
     ParentModule->getAliasList().push_back(this);