summaryrefslogtreecommitdiffstats
path: root/lib/Sema/IdentifierResolver.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2010-01-02 21:44:36 +0000
committerEli Friedman <eli.friedman@gmail.com>2010-01-02 21:44:36 +0000
commit3a349947e5d4ba6bd16d775ce17cf9c9d181bc39 (patch)
treeb60626f1a524c11193954d14ce8a5235304888bf /lib/Sema/IdentifierResolver.cpp
parent9ed2059d7b0da1775bcd0e64621aa3d90c014dc0 (diff)
Eliminate dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/IdentifierResolver.cpp')
-rw-r--r--lib/Sema/IdentifierResolver.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/Sema/IdentifierResolver.cpp b/lib/Sema/IdentifierResolver.cpp
index 0dbf21961f..bff47519a7 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) {