From 8fb614cb3bac896f9c85092877b98325385aeb02 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 1 Nov 2012 09:37:49 +0000 Subject: 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 --- lib/VMCore/Type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/VMCore') 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(this)->getAddressSpace(); + return cast(getScalarType())->getAddressSpace(); } -- cgit v1.2.3