diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-26 08:11:39 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-26 08:11:39 +0000 |
commit | 3ac38e99b958bfdeff1653c5ec59677d2a9fab4f (patch) | |
tree | 3438c18c89bea2cc66d0996c252f3b74589b438f /llvm/lib/Target/TargetData.cpp | |
parent | 675fb2301fa8b77e8d6d0b84be7a5799d1ab9b01 (diff) | |
download | bcm5719-llvm-3ac38e99b958bfdeff1653c5ec59677d2a9fab4f.tar.gz bcm5719-llvm-3ac38e99b958bfdeff1653c5ec59677d2a9fab4f.zip |
For PR761:
The Module::setEndianness and Module::setPointerSize methods have been
removed. Instead you can get/set the DataLayout. Adjust thise accordingly.
llvm-svn: 33530
Diffstat (limited to 'llvm/lib/Target/TargetData.cpp')
-rw-r--r-- | llvm/lib/Target/TargetData.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp index e950e56f564..77bb01ebed2 100644 --- a/llvm/lib/Target/TargetData.cpp +++ b/llvm/lib/Target/TargetData.cpp @@ -189,8 +189,8 @@ void TargetData::init(const std::string &TargetDescription) { } } - // Unless explicitly specified, the alignments for longs and doubles is capped by - // pointer size. + // Unless explicitly specified, the alignments for longs and doubles is + // capped by pointer size. if (LongABIAlignment == 0) LongABIAlignment = LongPrefAlignment = PointerMemSize; if (DoubleABIAlignment == 0) @@ -198,25 +198,7 @@ void TargetData::init(const std::string &TargetDescription) { } TargetData::TargetData(const Module *M) { - LittleEndian = M->getEndianness() != Module::BigEndian; - PointerMemSize = M->getPointerSize() != Module::Pointer64 ? 4 : 8; - PointerABIAlignment = PointerMemSize; - DoubleABIAlignment = PointerMemSize; - FloatABIAlignment = 4; - LongABIAlignment = PointerMemSize; - IntABIAlignment = 4; - ShortABIAlignment = 2; - ByteABIAlignment = 1; - BoolABIAlignment = 1; - BoolPrefAlignment = BoolABIAlignment; - BytePrefAlignment = ByteABIAlignment; - ShortPrefAlignment = ShortABIAlignment; - IntPrefAlignment = IntABIAlignment; - LongPrefAlignment = LongABIAlignment; - FloatPrefAlignment = FloatABIAlignment; - DoublePrefAlignment = DoubleABIAlignment; - PointerPrefAlignment = PointerABIAlignment; - AggMinPrefAlignment = 0; + init(M->getDataLayout()); } /// Layouts - The lazy cache of structure layout information maintained by |