diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-04-11 00:00:54 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-04-11 00:00:54 +0000 |
commit | c2112181b96349eb595dc5e8b7073b81ecdec0db (patch) | |
tree | 5b3182c7bb81ac8c59d29277efcd7f86b29ae882 /lib/AST/ASTContext.cpp | |
parent | e1d918e9fe55e3b34401fd5d420c47ea0f9572c9 (diff) |
Non-pointer objects are none gc'able regardles of
the attribute set on them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 25ab97e7c7..ac69a38c3d 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -2694,6 +2694,10 @@ QualType::GCAttrTypes ASTContext::getObjCGCAttrKind(const QualType &Ty) const { else if (Ty->isPointerType()) return getObjCGCAttrKind(Ty->getAsPointerType()->getPointeeType()); } + // Non-pointers have none gc'able attribute regardless of the attribute + // set on them. + else if (!isObjCObjectPointerType(Ty) && !Ty->isPointerType()) + return QualType::GCNone; } return GCAttrs; } |