diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-08-14 00:24:05 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-08-14 00:24:05 +0000 |
commit | c2a484164d6d254db423c6192f32f73bb9d022ef (patch) | |
tree | 44cf8db46124d931f67abb92396028436d1d4462 /lib/Transforms/InstCombine | |
parent | bfb07b1054b653661306848e695b34e79289a15b (diff) | |
download | llvm-c2a484164d6d254db423c6192f32f73bb9d022ef.tar.gz llvm-c2a484164d6d254db423c6192f32f73bb9d022ef.tar.bz2 llvm-c2a484164d6d254db423c6192f32f73bb9d022ef.tar.xz |
Use array initializer, space around operator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index e2d7966cb3..0034ddf63a 100644 --- a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp @@ -180,12 +180,10 @@ Instruction *InstCombiner::visitAllocaInst(AllocaInst &AI) { // Now that I is pointing to the first non-allocation-inst in the block, // insert our getelementptr instruction... // - Value *NullIdx =Constant::getNullValue(Type::getInt32Ty(AI.getContext())); - Value *Idx[2]; - Idx[0] = NullIdx; - Idx[1] = NullIdx; + Value *NullIdx = Constant::getNullValue(Type::getInt32Ty(AI.getContext())); + Value *Idx[2] = { NullIdx, NullIdx }; Instruction *GEP = - GetElementPtrInst::CreateInBounds(New, Idx, New->getName()+".sub"); + GetElementPtrInst::CreateInBounds(New, Idx, New->getName() + ".sub"); InsertNewInstBefore(GEP, *It); // Now make everything use the getelementptr instead of the original |