diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-08-11 20:58:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-08-11 20:58:55 +0000 |
commit | 01a4cf11777bb34c35f5d251a9e95eb736d0842b (patch) | |
tree | a42cce429ab7bfe7f553876d4249d4a4cf7072aa /lib/Sema/SemaExprMember.cpp | |
parent | 0aeb2890389ec1872e49a18fb2022bfb9f96578d (diff) |
Encapsulate the Objective-C id/Class/SEL "redefinition" types in
ASTContext with accessors/mutators. The only functional change is that
the AST writer won't bother writing the id/Class/SEL redefinition type
if it hasn't been explicitly set; previously, it ended up being
written as a synonym for the built-in id/Class/SEL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137349 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprMember.cpp')
-rw-r--r-- | lib/Sema/SemaExprMember.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Sema/SemaExprMember.cpp b/lib/Sema/SemaExprMember.cpp index cde29f5b4c..0fd654b479 100644 --- a/lib/Sema/SemaExprMember.cpp +++ b/lib/Sema/SemaExprMember.cpp @@ -953,9 +953,9 @@ static bool ShouldTryAgainWithRedefinitionType(Sema &S, ExprResult &base) { QualType redef; if (ty->isObjCId()) { - redef = S.Context.ObjCIdRedefinitionType; + redef = S.Context.getObjCIdRedefinitionType(); } else if (ty->isObjCClass()) { - redef = S.Context.ObjCClassRedefinitionType; + redef = S.Context.getObjCClassRedefinitionType(); } else { return false; } @@ -1322,8 +1322,9 @@ Sema::LookupMemberExpr(LookupResult &R, ExprResult &BaseExpr, // not just a pointer to builtin-sel again. if (IsArrow && BaseType->isSpecificBuiltinType(BuiltinType::ObjCSel) && - !Context.ObjCSelRedefinitionType->isObjCSelType()) { - BaseExpr = ImpCastExprToType(BaseExpr.take(), Context.ObjCSelRedefinitionType, + !Context.getObjCSelRedefinitionType()->isObjCSelType()) { + BaseExpr = ImpCastExprToType(BaseExpr.take(), + Context.getObjCSelRedefinitionType(), CK_BitCast); return LookupMemberExpr(R, BaseExpr, IsArrow, OpLoc, SS, ObjCImpDecl, HasTemplateArgs); |