[llvm-commits] [llvm-gcc-4.2] r40052 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Duncan Sands
baldrick at free.fr
Thu Jul 19 05:55:14 PDT 2007
Author: baldrick
Date: Thu Jul 19 07:55:13 2007
New Revision: 40052
URL: http://llvm.org/viewvc/llvm-project?rev=40052&view=rev
Log:
Cast DECL_ALIGN_UNIT to unsigned. Presumably it is
signed because BITS_PER_UNIT is signed. Wrap a long
line while there.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=40052&r1=40051&r2=40052&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Thu Jul 19 07:55:13 2007
@@ -864,8 +864,10 @@
// 1) DECL_ALIGN_UNIT does not match alignment as per ABI specification
// 2) DECL_ALIGN is set by user.
if (DECL_ALIGN_UNIT(decl)) {
- unsigned TargetAlign = getTargetData().getABITypeAlignment(GV->getType()->getElementType());
- if (DECL_USER_ALIGN(decl) || TargetAlign != DECL_ALIGN_UNIT(decl))
+ unsigned TargetAlign =
+ getTargetData().getABITypeAlignment(GV->getType()->getElementType());
+ if (DECL_USER_ALIGN(decl) ||
+ TargetAlign != (unsigned)DECL_ALIGN_UNIT(decl))
GV->setAlignment(DECL_ALIGN_UNIT(decl));
}
More information about the llvm-commits
mailing list