summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/VMCore')
-rw-r--r--llvm/lib/VMCore/ConstantFold.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp
index 8641f77b7a6..15b6df90a44 100644
--- a/llvm/lib/VMCore/ConstantFold.cpp
+++ b/llvm/lib/VMCore/ConstantFold.cpp
@@ -1873,10 +1873,10 @@ Constant *llvm::ConstantFoldGetElementPtr(LLVMContext &Context,
for (unsigned i = 0; i != NumIdx; ++i)
if (!NewIdxs[i]) NewIdxs[i] = Idxs[i];
return inBounds ?
- ConstantExpr::getGetElementPtr(const_cast<Constant*>(C),
- NewIdxs.data(), NewIdxs.size()) :
ConstantExpr::getInBoundsGetElementPtr(const_cast<Constant*>(C),
- NewIdxs.data(), NewIdxs.size());
+ NewIdxs.data(), NewIdxs.size()) :
+ ConstantExpr::getGetElementPtr(const_cast<Constant*>(C),
+ NewIdxs.data(), NewIdxs.size());
}
// If all indices are known integers and normalized, we can do a simple
OpenPOWER on IntegriCloud