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 | 640ff9dbcff7fb2c9bd16d10befcccc57e212b9a (patch) | |
tree | 79f746d54e60ee0882245e925b44def824065117 | |
parent | 7473b4705aff1e16dc18851cd21f79a7d728297c (diff) | |
download | bcm5719-llvm-640ff9dbcff7fb2c9bd16d10befcccc57e212b9a.tar.gz bcm5719-llvm-640ff9dbcff7fb2c9bd16d10befcccc57e212b9a.zip |
Use array initializer, space around operator
llvm-svn: 188337
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index e2d7966cb3e..0034ddf63a4 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/llvm/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 |