Revamp the "ConstantStruct::get" methods. Previously, these were scattered
[oota-llvm.git] / lib / Transforms / Instrumentation / ProfilingUtils.cpp
index 7435bc37fbe16a3b0af6b948474a6f5a96f9e5f8..4224ee303f07790bb2eeef123b1e21b7e39c2743 100644 (file)
@@ -164,7 +164,8 @@ void llvm::InsertProfilingShutdownCall(Function *Callee, Module *Mod) {
   GlobalVariable *GlobalDtors = new GlobalVariable(
       *Mod, ArrayType::get(GlobalDtorElemTy, 1), false,
       GlobalValue::AppendingLinkage, NULL, "llvm.global_dtors");
-  dtors.push_back(ConstantStruct::get(Mod->getContext(), Elem, 2, false));
+                                    
+  dtors.push_back(ConstantStruct::get(GlobalDtorElemTy, Elem));
   GlobalDtors->setInitializer(ConstantArray::get(
       cast<ArrayType>(GlobalDtors->getType()->getElementType()), dtors));
 }