[llvm] r188337 - Use array initializer, space around operator

Matt Arsenault Matthew.Arsenault at amd.com
Tue Aug 13 17:24:05 PDT 2013


Author: arsenm
Date: Tue Aug 13 19:24:05 2013
New Revision: 188337

URL: http://llvm.org/viewvc/llvm-project?rev=188337&view=rev
Log:
Use array initializer, space around operator

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp?rev=188337&r1=188336&r2=188337&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp Tue Aug 13 19:24:05 2013
@@ -180,12 +180,10 @@ Instruction *InstCombiner::visitAllocaIn
       // 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





More information about the llvm-commits mailing list