aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-09-13 21:35:00 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-09-13 21:35:00 +0000
commit144b38a7995cbe0928e34fbcc865bb2d2be4f7a3 (patch)
tree981d722a5c76ddff74a3a1903f3cba0168acc976 /lib/AST/ASTContext.cpp
parent93013b235680b184be3cda150bcd6456944415f4 (diff)
[PCH] Fix a regression that r139441 introduced (decls were getting passed
to the consumer without being fully deserialized). The regression was on compiling boost.python and it was too difficult to get a reduced test case unfortunately. Also modify the logic of how objc methods are getting passed to the consumer; codegen depended on receiving objc methods before the implementation decl. Since the interesting objc methods are ones with a body and such methods only exist inside an ObjCImplDecl, deserialize and pass to consumer all the methods of ObCImplDecl when we see one. Fixes http://llvm.org/PR10922 & rdar://10117105. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139644 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 8131c4b163..50a3942cc1 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -6387,7 +6387,7 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
if (!VD->isFileVarDecl())
return false;
- } else if (!isa<FunctionDecl>(D) && !isa<ObjCMethodDecl>(D))
+ } else if (!isa<FunctionDecl>(D))
return false;
// Weak references don't produce any output by themselves.
@@ -6427,9 +6427,6 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
return false;
return true;
}
-
- if (const ObjCMethodDecl *Method = dyn_cast<ObjCMethodDecl>(D))
- return Method->hasBody();
const VarDecl *VD = cast<VarDecl>(D);
assert(VD->isFileVarDecl() && "Expected file scoped var");