Deleted Added
full compact
Redeclarable.h (198092) Redeclarable.h (198893)
1//===-- Redeclarable.h - Base for Decls that can be redeclared -*- C++ -*-====//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 74 unchanged lines hidden (view full) ---

83 /// is the only declaration.
84 const decl_type *getFirstDeclaration() const {
85 const decl_type *D = static_cast<const decl_type*>(this);
86 while (D->getPreviousDeclaration())
87 D = D->getPreviousDeclaration();
88 return D;
89 }
90
1//===-- Redeclarable.h - Base for Decls that can be redeclared -*- C++ -*-====//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 74 unchanged lines hidden (view full) ---

83 /// is the only declaration.
84 const decl_type *getFirstDeclaration() const {
85 const decl_type *D = static_cast<const decl_type*>(this);
86 while (D->getPreviousDeclaration())
87 D = D->getPreviousDeclaration();
88 return D;
89 }
90
91 /// \brief Returns the most recent (re)declaration of this declaration.
92 const decl_type *getMostRecentDeclaration() const {
93 return getFirstDeclaration()->RedeclLink.getNext();
94 }
95
91 /// \brief Set the previous declaration. If PrevDecl is NULL, set this as the
92 /// first and only declaration.
93 void setPreviousDeclaration(decl_type *PrevDecl) {
94 decl_type *First;
95
96 if (PrevDecl) {
97 // Point to previous.
98 RedeclLink = PreviousDeclLink(PrevDecl);

--- 64 unchanged lines hidden ---
96 /// \brief Set the previous declaration. If PrevDecl is NULL, set this as the
97 /// first and only declaration.
98 void setPreviousDeclaration(decl_type *PrevDecl) {
99 decl_type *First;
100
101 if (PrevDecl) {
102 // Point to previous.
103 RedeclLink = PreviousDeclLink(PrevDecl);

--- 64 unchanged lines hidden ---