diff options
author | Chris Lattner <sabre@nondot.org> | 2008-12-08 07:21:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-12-08 07:21:39 +0000 |
commit | 700a35b83f9c484cb51d0c6ab35166b9099e8233 (patch) | |
tree | d6df580c7d9e6ba036a5b80589bd47a0aeac1d69 | |
parent | 97c1e14670b8190c553f94a5ee0e51b766c4fd0a (diff) | |
download | external_llvm-700a35b83f9c484cb51d0c6ab35166b9099e8233.zip external_llvm-700a35b83f9c484cb51d0c6ab35166b9099e8233.tar.gz external_llvm-700a35b83f9c484cb51d0c6ab35166b9099e8233.tar.bz2 |
consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60694 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/TargetData.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index 213bd5f..8ef50a8 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) + if ((StructSize & TyAlign-1) != 0) StructSize = TargetData::RoundUpAlignment(StructSize, TyAlign); // Keep track of maximum alignment constraint. @@ -66,7 +66,7 @@ StructLayout::StructLayout(const StructType *ST, const TargetData &TD) { // Add padding to the end of the struct so that it could be put in an array // and all array elements would be aligned correctly. - if (StructSize & (StructAlignment-1) != 0) + if ((StructSize & (StructAlignment-1)) != 0) StructSize = TargetData::RoundUpAlignment(StructSize, StructAlignment); } |