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/SemaDecl.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/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 542614ed9e..8fe2e54400 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1324,21 +1324,21 @@ void Sema::MergeTypedefNameDecl(TypedefNameDecl *New, LookupResult &OldDecls) { case 2: if (!TypeID->isStr("id")) break; - Context.ObjCIdRedefinitionType = New->getUnderlyingType(); + Context.setObjCIdRedefinitionType(New->getUnderlyingType()); // Install the built-in type for 'id', ignoring the current definition. New->setTypeForDecl(Context.getObjCIdType().getTypePtr()); return; case 5: if (!TypeID->isStr("Class")) break; - Context.ObjCClassRedefinitionType = New->getUnderlyingType(); + Context.setObjCClassRedefinitionType(New->getUnderlyingType()); // Install the built-in type for 'Class', ignoring the current definition. New->setTypeForDecl(Context.getObjCClassType().getTypePtr()); return; case 3: if (!TypeID->isStr("SEL")) break; - Context.ObjCSelRedefinitionType = New->getUnderlyingType(); + Context.setObjCSelRedefinitionType(New->getUnderlyingType()); // Install the built-in type for 'SEL', ignoring the current definition. New->setTypeForDecl(Context.getObjCSelType().getTypePtr()); return; |