From: Jakub Staszak Date: Thu, 7 Mar 2013 22:20:06 +0000 (+0000) Subject: Keep coding stanard. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=11687d4982200fe99a820ea513100f237dfc1609;p=oota-llvm.git Keep coding stanard. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176661 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/SROA.cpp b/lib/Transforms/Scalar/SROA.cpp index dedbbde4f7b..810a553c74b 100644 --- a/lib/Transforms/Scalar/SROA.cpp +++ b/lib/Transforms/Scalar/SROA.cpp @@ -1097,13 +1097,12 @@ Type *AllocaPartitioning::getCommonType(iterator I) const { continue; Type *UserTy = 0; - if (LoadInst *LI = dyn_cast(UI->U->getUser())) { + if (LoadInst *LI = dyn_cast(UI->U->getUser())) UserTy = LI->getType(); - } else if (StoreInst *SI = dyn_cast(UI->U->getUser())) { + else if (StoreInst *SI = dyn_cast(UI->U->getUser())) UserTy = SI->getValueOperand()->getType(); - } else { + else return 0; // Bail if we have weird uses. - } if (IntegerType *ITy = dyn_cast(UserTy)) { // If the type is larger than the partition, skip it. We only encounter