[opaque pointer type] API migration for GEP constant factories
[oota-llvm.git] / tools / bugpoint / Miscompilation.cpp
index 98061bd585af0121d13c742d978988c3b00ea63d..53631d25c390eddcf13c52ea23cc1fea79daacd9 100644 (file)
@@ -852,7 +852,8 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
         // GetElementPtr *funcName, ulong 0, ulong 0
         std::vector<Constant*> GEPargs(2,
                      Constant::getNullValue(Type::getInt32Ty(F->getContext())));
-        Value *GEP = ConstantExpr::getGetElementPtr(funcName, GEPargs);
+        Value *GEP = ConstantExpr::getGetElementPtr(InitArray->getType(),
+                                                    funcName, GEPargs);
         std::vector<Value*> ResolverArgs;
         ResolverArgs.push_back(GEP);