summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-14 17:41:52 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-14 17:41:52 +0000
commitdb215964732a3a43718133083222e62fed7c3ee7 (patch)
tree18f5e0897493f7d8362c737cda41480f3209382e /clang/lib/AST
parentfc807f84ed53503835a95f1b5357c7243257baaa (diff)
downloadbcm5719-llvm-db215964732a3a43718133083222e62fed7c3ee7.tar.gz
bcm5719-llvm-db215964732a3a43718133083222e62fed7c3ee7.zip
[PCH] Serialize info about redeclared objc methods.
llvm-svn: 141964
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/DeclObjC.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index 170cdf43fc4..a589b7f9d3e 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud