summaryrefslogtreecommitdiff
path: root/lib/VMCore/Type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Type.cpp')
-rw-r--r--lib/VMCore/Type.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index 445e15d388..1bbd2c6cf0 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -215,12 +215,7 @@ unsigned Type::getVectorNumElements() const {
}
unsigned Type::getPointerAddressSpace() const {
- if (isPointerTy())
- return cast<PointerType>(this)->getAddressSpace();
- if (isVectorTy())
- return getSequentialElementType()->getPointerAddressSpace();
- llvm_unreachable("Should never reach here!");
- return 0;
+ return cast<PointerType>(this)->getAddressSpace();
}