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 | 9767347b11bfeac631f477d3965f5f1f3ef4ee72 (patch) | |
tree | 6ff24feb16f95c8ab29e22839cefdd235c093eb3 /clang/lib/Sema/SemaDecl.cpp | |
parent | d5e00ba6c4c14fb282119199300c9f7e4820e0b2 (diff) | |
download | bcm5719-llvm-9767347b11bfeac631f477d3965f5f1f3ef4ee72.tar.gz bcm5719-llvm-9767347b11bfeac631f477d3965f5f1f3ef4ee72.zip |
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.
llvm-svn: 137349
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 542614ed9e6..8fe2e544009 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/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; |