aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Target/TargetData.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index 0bdb23b..b2d76d8 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -565,12 +565,7 @@ unsigned char TargetData::getPreferredTypeAlignmentShift(const Type *Ty) const {
/// getIntPtrType - Return an unsigned integer type that is the same size or
/// greater to the host pointer size.
const Type *TargetData::getIntPtrType() const {
- switch (getPointerSize()) {
- default: assert(0 && "Unknown pointer size!");
- case 2: return Type::Int16Ty;
- case 4: return Type::Int32Ty;
- case 8: return Type::Int64Ty;
- }
+ return IntegerType::get(getPointerSizeInBits());
}