From b4263a6ff4f9696fc84a8f75b5d09564ff06381f Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 22 Jul 2011 08:52:50 +0000 Subject: Fix more MSVC warnings caused by a cases I missed when converting 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 | 2 +- lib/Transforms/IPO/GlobalOpt.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/CodeGen/ShadowStackGC.cpp b/lib/CodeGen/ShadowStackGC.cpp index 612c9fca58..9807c8cb27 100644 --- a/lib/CodeGen/ShadowStackGC.cpp +++ b/lib/CodeGen/ShadowStackGC.cpp @@ -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) { diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index fd263c901b..48f51bbe8f 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -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. -- cgit v1.2.3