[opaque pointer type] API migration for GEP constant factories
[oota-llvm.git] / lib / Analysis / ScalarEvolutionExpander.cpp
index a73ec9ecc029381f618b068bbb6a63e6361a74b9..1bdddebf9c96e7a7fb09d81b040add6641a1fc38 100644 (file)
@@ -488,7 +488,8 @@ Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin,
     // Fold a GEP with constant operands.
     if (Constant *CLHS = dyn_cast<Constant>(V))
       if (Constant *CRHS = dyn_cast<Constant>(Idx))
-        return ConstantExpr::getGetElementPtr(CLHS, CRHS);
+        return ConstantExpr::getGetElementPtr(Type::getInt8Ty(Ty->getContext()),
+                                              CLHS, CRHS);
 
     // Do a quick scan to see if we have this GEP nearby.  If so, reuse it.
     unsigned ScanLimit = 6;