diff options
author | Chris Lattner <sabre@nondot.org> | 2005-04-23 22:01:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-04-23 22:01:39 +0000 |
commit | ea1049139ecfb281f4ffb07de09a56fde839482c (patch) | |
tree | a6058b8a2b24653017d4216f8009e9dd6858f31a /lib/VMCore/Type.cpp | |
parent | e862547a0c0338fe53bdf9f8901b6ca563f498e1 (diff) | |
download | external_llvm-ea1049139ecfb281f4ffb07de09a56fde839482c.zip external_llvm-ea1049139ecfb281f4ffb07de09a56fde839482c.tar.gz external_llvm-ea1049139ecfb281f4ffb07de09a56fde839482c.tar.bz2 |
Fix a bug in my previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21485 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Type.cpp')
-rw-r--r-- | lib/VMCore/Type.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index fb7479a..48c468a 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -138,34 +138,34 @@ const Type *Type::getSignedVersion() const { // unsigned Type::getPrimitiveSize() const { switch (getTypeID()) { - case Type::BoolTy: - case Type::SByteTy: - case Type::UByteTy: return 1; - case Type::UShortTy: - case Type::ShortTy: return 2; - case Type::FloatTy: - case Type::IntTy: - case Type::UIntTy: return 4; - case Type::LongTy: - case Type::ULongTy: - case Type::DoubleTy: return 8; + case Type::BoolTyID: + case Type::SByteTyID: + case Type::UByteTyID: return 1; + case Type::UShortTyID: + case Type::ShortTyID: return 2; + case Type::FloatTyID: + case Type::IntTyID: + case Type::UIntTyID: return 4; + case Type::LongTyID: + case Type::ULongTyID: + case Type::DoubleTyID: return 8; default: return 0; } } unsigned Type::getPrimitiveSizeInBits() const { switch (getTypeID()) { - case Type::BoolTy: return 1; - case Type::SByteTy: - case Type::UByteTy: return 8; - case Type::UShortTy: - case Type::ShortTy: return 16; - case Type::FloatTy: - case Type::IntTy: - case Type::UIntTy: return 32; - case Type::LongTy: - case Type::ULongTy: - case Type::DoubleTy: return 64; + case Type::BoolTyID: return 1; + case Type::SByteTyID: + case Type::UByteTyID: return 8; + case Type::UShortTyID: + case Type::ShortTyID: return 16; + case Type::FloatTyID: + case Type::IntTyID: + case Type::UIntTyID: return 32; + case Type::LongTyID: + case Type::ULongTyID: + case Type::DoubleTyID: return 64; default: return 0; } } |