[llvm-commits] [llvm] r60755 - /llvm/trunk/lib/Target/TargetData.cpp
Duncan Sands
baldrick at free.fr
Tue Dec 9 01:58:13 PST 2008
Author: baldrick
Date: Tue Dec 9 03:58:11 2008
New Revision: 60755
URL: http://llvm.org/viewvc/llvm-project?rev=60755&view=rev
Log:
Handle a compiler warning.
Modified:
llvm/trunk/lib/Target/TargetData.cpp
Modified: llvm/trunk/lib/Target/TargetData.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetData.cpp?rev=60755&r1=60754&r2=60755&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetData.cpp (original)
+++ llvm/trunk/lib/Target/TargetData.cpp Tue Dec 9 03:58:11 2008
@@ -51,7 +51,7 @@
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.
More information about the llvm-commits
mailing list