diff options
author | John McCall <rjmccall@apple.com> | 2012-10-17 04:53:31 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-10-17 04:53:31 +0000 |
commit | 0d54a17b52bfb5cd20ac39e8d9e5b0533f4aa08c (patch) | |
tree | 294032f34e34e9e41f292efdc74eac565b80e282 /clang/lib/Serialization/ASTReaderDecl.cpp | |
parent | ef19dbb62031b20798badebc9d11ae0fa369a3c0 (diff) | |
download | bcm5719-llvm-0d54a17b52bfb5cd20ac39e8d9e5b0533f4aa08c.tar.gz bcm5719-llvm-0d54a17b52bfb5cd20ac39e8d9e5b0533f4aa08c.zip |
Set a special flag in class metadata when an Objective-C class
has ivars that require destruction, but none that require anything
except zero-initialization. This is common in ARC and (when true
throughout a class hierarchy) permits the elimination of an
unnecessary message-send during allocation.
llvm-svn: 166088
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index d85cb4eca93..17509c85278 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -855,6 +855,8 @@ void ASTDeclReader::VisitObjCImplementationDecl(ObjCImplementationDecl *D) { D->setSuperClass(ReadDeclAs<ObjCInterfaceDecl>(Record, Idx)); D->setIvarLBraceLoc(ReadSourceLocation(Record, Idx)); D->setIvarRBraceLoc(ReadSourceLocation(Record, Idx)); + D->setHasNonZeroConstructors(Record[Idx++]); + D->setHasDestructors(Record[Idx++]); llvm::tie(D->IvarInitializers, D->NumIvarInitializers) = Reader.ReadCXXCtorInitializers(F, Record, Idx); } |