diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-14 17:41:52 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-14 17:41:52 +0000 |
commit | 72b2625aa67c8213acaf4bf6209b67859d60e2cf (patch) | |
tree | f14c39503aaf87506d6a37a2964adebbd815faab /lib/AST/DeclObjC.cpp | |
parent | d5951cbf4ef86c417609237e6815ac3ca638a09c (diff) |
[PCH] Serialize info about redeclared objc methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141964 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 170cdf43fc..a589b7f9d3 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -355,6 +355,7 @@ void ObjCMethodDecl::setAsRedeclaration(const ObjCMethodDecl *PrevMethod) { assert(PrevMethod); getASTContext().setObjCMethodRedeclaration(PrevMethod, this); IsRedeclaration = true; + PrevMethod->HasRedeclaration = true; } void ObjCMethodDecl::setParamsAndSelLocs(ASTContext &C, @@ -398,8 +399,9 @@ void ObjCMethodDecl::setMethodParams(ASTContext &C, /// Otherwise it will return itself. ObjCMethodDecl *ObjCMethodDecl::getNextRedeclaration() { ASTContext &Ctx = getASTContext(); - ObjCMethodDecl *Redecl = - const_cast<ObjCMethodDecl*>(Ctx.getObjCMethodRedeclaration(this)); + ObjCMethodDecl *Redecl = 0; + if (HasRedeclaration) + Redecl = const_cast<ObjCMethodDecl*>(Ctx.getObjCMethodRedeclaration(this)); if (Redecl) return Redecl; |