summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/VMCore/Core.cpp')
-rw-r--r--llvm/lib/VMCore/Core.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/Core.cpp b/llvm/lib/VMCore/Core.cpp
index 35ba43a2632..e3b2cb400fc 100644
--- a/llvm/lib/VMCore/Core.cpp
+++ b/llvm/lib/VMCore/Core.cpp
@@ -792,18 +792,19 @@ LLVMValueRef LLVMConstAShr(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) {
LLVMValueRef LLVMConstGEP(LLVMValueRef ConstantVal,
LLVMValueRef *ConstantIndices, unsigned NumIndices) {
+ ArrayRef<Constant *> IdxList(unwrap<Constant>(ConstantIndices, NumIndices),
+ NumIndices);
return wrap(ConstantExpr::getGetElementPtr(unwrap<Constant>(ConstantVal),
- unwrap<Constant>(ConstantIndices,
- NumIndices),
- NumIndices));
+ IdxList));
}
LLVMValueRef LLVMConstInBoundsGEP(LLVMValueRef ConstantVal,
LLVMValueRef *ConstantIndices,
unsigned NumIndices) {
Constant* Val = unwrap<Constant>(ConstantVal);
- Constant** Idxs = unwrap<Constant>(ConstantIndices, NumIndices);
- return wrap(ConstantExpr::getInBoundsGetElementPtr(Val, Idxs, NumIndices));
+ ArrayRef<Constant *> IdxList(unwrap<Constant>(ConstantIndices, NumIndices),
+ NumIndices);
+ return wrap(ConstantExpr::getInBoundsGetElementPtr(Val, IdxList));
}
LLVMValueRef LLVMConstTrunc(LLVMValueRef ConstantVal, LLVMTypeRef ToType) {
OpenPOWER on IntegriCloud