Fix this function to not say that longs have 8-byte alignment on X86/PPC.
authorChris Lattner <sabre@nondot.org>
Tue, 2 Nov 2004 22:18:18 +0000 (22:18 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 2 Nov 2004 22:18:18 +0000 (22:18 +0000)
This method is really a gross hack, but at least we can make it work on
the targets we support right now.

This bug fix stops a crash in a testcase reduced from 176.gcc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17443 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/TargetData.cpp

index a57d6ba2fba8b1f77998d39f98ddb4ddbf9b9af1..594c33588efc7b7a077022458cbadbed8831e2bf 100644 (file)
@@ -107,7 +107,7 @@ TargetData::TargetData(const std::string &ToolName, const Module *M) {
   PointerAlignment = PointerSize;
   DoubleAlignment  = PointerSize;
   FloatAlignment   = 4;
-  LongAlignment    = 8;
+  LongAlignment    = PointerSize;
   IntAlignment     = 4;
   ShortAlignment   = 2;
   ByteAlignment    = 1;