summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterDecl.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
commita98e861939b508cdd14c74bb01a9676f69ac4493 (patch)
treec06ab2e2ccf7c0baee76b988c5f777cae67b9aa3 /clang/lib/Serialization/ASTWriterDecl.cpp
parentf92b2e0714c5e797aba919660570b5751114a752 (diff)
downloadbcm5719-llvm-a98e861939b508cdd14c74bb01a9676f69ac4493.tar.gz
bcm5719-llvm-a98e861939b508cdd14c74bb01a9676f69ac4493.zip
[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. llvm-svn: 139644
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterDecl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp
index 55f1a6f9ce5..80685ad6749 100644
--- a/clang/lib/Serialization/ASTWriterDecl.cpp
+++ b/clang/lib/Serialization/ASTWriterDecl.cpp
@@ -1594,6 +1594,9 @@ void ASTWriter::WriteDeclsBlockAbbrevs() {
/// relatively painless since they would presumably only do it for top-level
/// decls.
static bool isRequiredDecl(const Decl *D, ASTContext &Context) {
+ // An ObjCMethodDecl is never considered as "required" because its
+ // implementation container always is.
+
// File scoped assembly or obj-c implementation must be seen.
if (isa<FileScopeAsmDecl>(D) || isa<ObjCImplDecl>(D))
return true;
OpenPOWER on IntegriCloud