diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-11-01 09:37:49 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-11-01 09:37:49 +0000 |
commit | 8fb614cb3bac896f9c85092877b98325385aeb02 (patch) | |
tree | a375e4566134e6d9401493d761da321a4e584208 /lib/VMCore | |
parent | 426c2bf5cdd2173e4a33aea8cb92cf684a724f4b (diff) | |
download | llvm-8fb614cb3bac896f9c85092877b98325385aeb02.tar.gz llvm-8fb614cb3bac896f9c85092877b98325385aeb02.tar.bz2 llvm-8fb614cb3bac896f9c85092877b98325385aeb02.tar.xz |
Teach Type::getPointerAddressSpace to look through pointer vectors
politely and document this feature.
This simple API extension then allows us to write all of the
Instructions' address space query methods much more simply. No
functionality change intended here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167223 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Type.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 1bbd2c6cf0..1656ab2cab 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -215,7 +215,7 @@ unsigned Type::getVectorNumElements() const { } unsigned Type::getPointerAddressSpace() const { - return cast<PointerType>(this)->getAddressSpace(); + return cast<PointerType>(getScalarType())->getAddressSpace(); } |