aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-22 08:16:57 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-22 08:16:57 +0000
commit040dd82f4497a1dc00d1b42df39274150c1b8fdb (patch)
tree0c607a36e2f78ed5efabd20675e324bc9109d3e8 /llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
parent43025a08699db9ca83c4f5a4607e056aab470b04 (diff)
downloadllvm-040dd82f4497a1dc00d1b42df39274150c1b8fdb.zip
llvm-040dd82f4497a1dc00d1b42df39274150c1b8fdb.tar.gz
llvm-040dd82f4497a1dc00d1b42df39274150c1b8fdb.tar.bz2
Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
ArrayRef. llvm-svn: 135761
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
index c2865a0..b13a032 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
@@ -1360,9 +1360,8 @@ Instruction *InstCombiner::commonPointerCastTransforms(CastInst &CI) {
// and bitcast the result. This eliminates one bitcast, potentially
// two.
Value *NGEP = cast<GEPOperator>(GEP)->isInBounds() ?
- Builder->CreateInBoundsGEP(OrigBase,
- NewIndices.begin(), NewIndices.end()) :
- Builder->CreateGEP(OrigBase, NewIndices.begin(), NewIndices.end());
+ Builder->CreateInBoundsGEP(OrigBase, NewIndices) :
+ Builder->CreateGEP(OrigBase, NewIndices);
NGEP->takeName(GEP);
if (isa<BitCastInst>(CI))