summaryrefslogtreecommitdiff
path: root/lib/Target/TargetData.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-14 22:41:13 +0000
committerChris Lattner <sabre@nondot.org>2002-10-14 22:41:13 +0000
commit85131c8277891c91f24fd6411449298ce4b1b648 (patch)
tree8e7592f8029129aa6429f51d47e279d142943bb2 /lib/Target/TargetData.cpp
parentad9ea7e69499e4359f9b566143b48bc03fb7e216 (diff)
downloadllvm-85131c8277891c91f24fd6411449298ce4b1b648.tar.gz
llvm-85131c8277891c91f24fd6411449298ce4b1b648.tar.bz2
llvm-85131c8277891c91f24fd6411449298ce4b1b648.tar.xz
- Add an endianness field to the TargetData datastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4174 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r--lib/Target/TargetData.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index fae5e103e6..1207a6eed1 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -81,14 +81,16 @@ Annotation *TargetData::TypeAnFactory(AnnotationID AID, const Annotable *T,
//===----------------------------------------------------------------------===//
TargetData::TargetData(const std::string &TargetName,
- unsigned char IntRegSize, unsigned char PtrSize,
- unsigned char PtrAl, unsigned char DoubleAl,
- unsigned char FloatAl, unsigned char LongAl,
- unsigned char IntAl, unsigned char ShortAl,
- unsigned char ByteAl)
+ bool isLittleEndian,
+ unsigned char IntRegSize, unsigned char PtrSize,
+ unsigned char PtrAl, unsigned char DoubleAl,
+ unsigned char FloatAl, unsigned char LongAl,
+ unsigned char IntAl, unsigned char ShortAl,
+ unsigned char ByteAl)
: AID(AnnotationManager::getID("TargetData::" + TargetName)) {
AnnotationManager::registerAnnotationFactory(AID, TypeAnFactory, this);
+ LittleEndian = isLittleEndian;
IntegerRegSize = IntRegSize;
PointerSize = PtrSize;
PointerAlignment = PtrAl;