Fix more MSVC warnings caused by a cases I missed when converting
authorJay Foad <jay.foad@gmail.com>
Fri, 22 Jul 2011 08:52:50 +0000 (08:52 +0000)
committerJay Foad <jay.foad@gmail.com>
Fri, 22 Jul 2011 08:52:50 +0000 (08:52 +0000)
ConstantExpr::getGetElementPtr to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135762 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/ShadowStackGC.cpp
lib/Transforms/IPO/GlobalOpt.cpp

index 612c9fca58f1135d932831a93b925325acc8e1e0..9807c8cb27ebd1f8555e6af1b5ba7317d998085d 100644 (file)
@@ -241,7 +241,7 @@ Constant *ShadowStackGC::GetFrameMap(Function &F) {
                           ConstantInt::get(Type::getInt32Ty(F.getContext()), 0),
                           ConstantInt::get(Type::getInt32Ty(F.getContext()), 0)
                           };
-  return ConstantExpr::getGetElementPtr(GV, GEPIndices, 2);
+  return ConstantExpr::getGetElementPtr(GV, GEPIndices);
 }
 
 Type* ShadowStackGC::GetConcreteStackEntryType(Function &F) {
index fd263c901baa138f6d6d2f367c66dd3716befbfc..48f51bbe8fe6d88258b274027ea3290fc1b2d039 100644 (file)
@@ -2370,7 +2370,7 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal,
               Constant *IdxZero = ConstantInt::get(IdxTy, 0, false);
               Constant * const IdxList[] = {IdxZero, IdxZero};
 
-              Ptr = ConstantExpr::getGetElementPtr(Ptr, IdxList, 2);
+              Ptr = ConstantExpr::getGetElementPtr(Ptr, IdxList);
             
             // If we can't improve the situation by introspecting NewTy,
             // we have to give up.