From: Duncan Sands Date: Tue, 9 Dec 2008 09:58:11 +0000 (+0000) Subject: Handle a compiler warning. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=677a7ec489ce75283d386fd8460834b924009a82;p=oota-llvm.git Handle a compiler warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60755 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index 8ef50a8cee9..859b9ce52ef 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -51,7 +51,7 @@ StructLayout::StructLayout(const StructType *ST, const TargetData &TD) { unsigned TyAlign = ST->isPacked() ? 1 : TD.getABITypeAlignment(Ty); // Add padding if necessary to align the data element properly. - if ((StructSize & TyAlign-1) != 0) + if ((StructSize & (TyAlign-1)) != 0) StructSize = TargetData::RoundUpAlignment(StructSize, TyAlign); // Keep track of maximum alignment constraint.