Create llvm.global_ctors in the new format.
[oota-llvm.git] / lib / Transforms / Utils / ModuleUtils.cpp
index c5abf76d93faa3c36caec8eff090f88501f7527d..9ec28a3f3d47c8201143b77485d1b24bc9305dfd 100644 (file)
@@ -43,9 +43,9 @@ static void appendToGlobalArray(const char *Array,
     }
     GVCtor->eraseFromParent();
   } else {
-    // Use a simple two-field struct if there isn't one already.
+    // Use the new three-field struct if there isn't one already.
     EltTy = StructType::get(IRB.getInt32Ty(), PointerType::getUnqual(FnTy),
-                            nullptr);
+                            IRB.getInt8PtrTy(), nullptr);
   }
 
   // Build a 2 or 3 field global_ctor entry.  We don't take a comdat key.