Add support for 'any' pointer size and endianness

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-08-24 13:49:22 +00:00
parent eb5d3a1526
commit 030574fd35

View File

@ -112,8 +112,8 @@ TargetData::TargetData(const std::string &ToolName, const Module *M)
: AID(AnnotationManager::getID("TargetData::" + ToolName)) {
AnnotationManager::registerAnnotationFactory(AID, TypeAnFactory, this);
LittleEndian = M->isLittleEndian();
PointerSize = M->has32BitPointers() ? 4 : 8;
LittleEndian = M->getEndianness() != Module::BigEndian;
PointerSize = M->getPointerSize() != Module::Pointer64 ? 4 : 8;
PointerAlignment = PointerSize;
DoubleAlignment = PointerSize;
FloatAlignment = 4;