summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/ShadowStackGC.cpp2
-rw-r--r--llvm/lib/Transforms/IPO/GlobalOpt.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ShadowStackGC.cpp b/llvm/lib/CodeGen/ShadowStackGC.cpp
index 612c9fca58f..9807c8cb27e 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 fd263c901ba..48f51bbe8fe 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.
OpenPOWER on IntegriCloud