diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-01-15 15:39:40 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-01-15 15:39:40 +0000 |
commit | a3fa5c7f1b5e2ba4d6ec033dc0e2376326b05824 (patch) | |
tree | a6082d4d1d1e9ddaea09a6a04bb4a47da95d642d /lib/Sema/IdentifierResolver.cpp | |
parent | bb1e3bc1e0be2b8f891db46457a8943451bf4d8b (diff) | |
download | FreeBSD-src-a3fa5c7f1b5e2ba4d6ec033dc0e2376326b05824.zip FreeBSD-src-a3fa5c7f1b5e2ba4d6ec033dc0e2376326b05824.tar.gz |
Update clang to r93512.
Diffstat (limited to 'lib/Sema/IdentifierResolver.cpp')
-rw-r--r-- | lib/Sema/IdentifierResolver.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/Sema/IdentifierResolver.cpp b/lib/Sema/IdentifierResolver.cpp index 0dbf219..bff4751 100644 --- a/lib/Sema/IdentifierResolver.cpp +++ b/lib/Sema/IdentifierResolver.cpp @@ -46,22 +46,6 @@ public: // IdDeclInfo Implementation //===----------------------------------------------------------------------===// -/// AddShadowed - Add a decl by putting it directly above the 'Shadow' decl. -/// Later lookups will find the 'Shadow' decl first. The 'Shadow' decl must -/// be already added to the scope chain and must be in the same context as -/// the decl that we want to add. -void IdentifierResolver::IdDeclInfo::AddShadowed(NamedDecl *D, - NamedDecl *Shadow) { - for (DeclsTy::iterator I = Decls.end(); I != Decls.begin(); --I) { - if (Shadow == *(I-1)) { - Decls.insert(I-1, D); - return; - } - } - - assert(0 && "Shadow wasn't in scope chain!"); -} - /// RemoveDecl - Remove the decl from the scope chain. /// The decl must already be part of the decl chain. void IdentifierResolver::IdDeclInfo::RemoveDecl(NamedDecl *D) { @@ -160,32 +144,6 @@ void IdentifierResolver::AddDecl(NamedDecl *D) { IDI->AddDecl(D); } -/// AddShadowedDecl - Link the decl to its shadowed decl chain putting it -/// after the decl that the iterator points to, thus the 'Shadow' decl will be -/// encountered before the 'D' decl. -void IdentifierResolver::AddShadowedDecl(NamedDecl *D, NamedDecl *Shadow) { - assert(D->getDeclName() == Shadow->getDeclName() && "Different ids!"); - - DeclarationName Name = D->getDeclName(); - void *Ptr = Name.getFETokenInfo<void>(); - assert(Ptr && "No decl from Ptr ?"); - - IdDeclInfo *IDI; - - if (isDeclPtr(Ptr)) { - Name.setFETokenInfo(NULL); - IDI = &(*IdDeclInfos)[Name]; - NamedDecl *PrevD = static_cast<NamedDecl*>(Ptr); - assert(PrevD == Shadow && "Invalid shadow decl ?"); - IDI->AddDecl(D); - IDI->AddDecl(PrevD); - return; - } - - IDI = toIdDeclInfo(Ptr); - IDI->AddShadowed(D, Shadow); -} - /// RemoveDecl - Unlink the decl from its shadowed decl chain. /// The decl must already be part of the decl chain. void IdentifierResolver::RemoveDecl(NamedDecl *D) { |