]> granicus.if.org Git - clang/commitdiff
Kill RecordType::getAddressSpace() and its fixme; that's just not how
authorJohn McCall <rjmccall@apple.com>
Thu, 23 Dec 2010 17:56:54 +0000 (17:56 +0000)
committerJohn McCall <rjmccall@apple.com>
Thu, 23 Dec 2010 17:56:54 +0000 (17:56 +0000)
address spaces work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122511 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/CanonicalType.h
include/clang/AST/Type.h

index 2d67a39f95174321193c988eabc8fba588539f5b..f5915d64fd326241a0d513332f4d9b150a22df2a 100644 (file)
@@ -639,7 +639,6 @@ struct CanProxyAdaptor<RecordType> : public CanProxyBase<RecordType> {
   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<>
index a2d9a17d31ba93fbece1c69d4dccba7fd1b2053d..5e675cbe87c6afe1b9c116e8ae5af055664a3aba 100644 (file)
@@ -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<ArrayType>(CT))
     return AT->getElementType().getAddressSpace();
-  if (const RecordType *RT = dyn_cast<RecordType>(CT))
-    return RT->getAddressSpace();
   return 0;
 }