From 17bab443081f79b5809913a6b503eb02e3953368 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 22 Jul 2011 08:52:50 +0000 Subject: [PATCH] Fix more MSVC warnings caused by a cases I missed when converting ConstantExpr::getGetElementPtr to use ArrayRef. llvm-svn: 135762 --- llvm/lib/CodeGen/ShadowStackGC.cpp | 2 +- llvm/lib/Transforms/IPO/GlobalOpt.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/ShadowStackGC.cpp b/llvm/lib/CodeGen/ShadowStackGC.cpp index 612c9fca58f1..9807c8cb27eb 100644 --- a/llvm/lib/CodeGen/ShadowStackGC.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index fd263c901baa..48f51bbe8fe6 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/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.