diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-07-22 08:52:50 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-07-22 08:52:50 +0000 |
commit | b4263a6ff4f9696fc84a8f75b5d09564ff06381f (patch) | |
tree | e202be051d0c0d77cf973b6829bd199b5583bba5 | |
parent | 0a2a60ace9b79164b71794ce7ff981171c61e442 (diff) | |
download | llvm-b4263a6ff4f9696fc84a8f75b5d09564ff06381f.tar.gz llvm-b4263a6ff4f9696fc84a8f75b5d09564ff06381f.tar.bz2 llvm-b4263a6ff4f9696fc84a8f75b5d09564ff06381f.tar.xz |
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
-rw-r--r-- | lib/CodeGen/ShadowStackGC.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/IPO/GlobalOpt.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
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. |