aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/TargetData.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-02 22:18:18 +0000
committerChris Lattner <sabre@nondot.org>2004-11-02 22:18:18 +0000
commitda6122f61d4f1c3f1ea16e20cccf22f42b9ee26d (patch)
tree373e4b8e6441b242618707867af303dff176a8c3 /lib/Target/TargetData.cpp
parent80f085500f8b7bfd876050a5817be4813480f49a (diff)
Fix this function to not say that longs have 8-byte alignment on X86/PPC.
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
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r--lib/Target/TargetData.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index a57d6ba2fb..594c33588e 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -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;