From 112407a90e677a7e3fe0e3b497041eb13318095b Mon Sep 17 00:00:00 2001 From: John McCall Date: Thu, 23 Dec 2010 17:56:54 +0000 Subject: [PATCH] Kill RecordType::getAddressSpace() and its fixme; that's just not how address spaces work. llvm-svn: 122511 --- clang/include/clang/AST/CanonicalType.h | 1 - clang/include/clang/AST/Type.h | 6 ------ 2 files changed, 7 deletions(-) diff --git a/clang/include/clang/AST/CanonicalType.h b/clang/include/clang/AST/CanonicalType.h index 2d67a39f9517..f5915d64fd32 100644 --- a/clang/include/clang/AST/CanonicalType.h +++ b/clang/include/clang/AST/CanonicalType.h @@ -639,7 +639,6 @@ struct CanProxyAdaptor : public CanProxyBase { LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(RecordDecl *, getDecl) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isBeingDefined) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasConstFields) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(unsigned, getAddressSpace) }; template<> diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index a2d9a17d31ba..5e675cbe87c6 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -2616,10 +2616,6 @@ public: // const, it needs to return false. bool hasConstFields() const { return false; } - // FIXME: RecordType needs to check when it is created that all fields are in - // the same address space, and return that. - unsigned getAddressSpace() const { return 0; } - bool isSugared() const { return false; } QualType desugar() const { return QualType(this, 0); } @@ -3703,8 +3699,6 @@ inline unsigned QualType::getAddressSpace() const { if (const ArrayType *AT = dyn_cast(CT)) return AT->getElementType().getAddressSpace(); - if (const RecordType *RT = dyn_cast(CT)) - return RT->getAddressSpace(); return 0; }