diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2018-03-10 06:36:08 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2018-03-10 06:36:08 +0000 |
commit | c181b127c0e33ac5bbdab559de0ad1e6383737b1 (patch) | |
tree | 9ce6ebc866c0ff47020bcb3b4b37d2af1180794a /clang/lib/AST/Decl.cpp | |
parent | b76ed82b58cba454799456217bc341ce59e83192 (diff) | |
download | bcm5719-llvm-c181b127c0e33ac5bbdab559de0ad1e6383737b1.tar.gz bcm5719-llvm-c181b127c0e33ac5bbdab559de0ad1e6383737b1.zip |
[ObjC] Allow declaring __weak pointer fields in C structs in ARC.
This patch uses the infrastructure added in r326307 for enabling
non-trivial fields to be declared in C structs to allow __weak fields in
C structs in ARC.
rdar://problem/33599681
Differential Revision: https://reviews.llvm.org/D44095
llvm-svn: 327206
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index b640dccbd85..35364d6abcb 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -3931,7 +3931,8 @@ RecordDecl::RecordDecl(Kind DK, TagKind TK, const ASTContext &C, HasObjectMember(false), HasVolatileMember(false), LoadedFieldsFromExternalStorage(false), NonTrivialToPrimitiveDefaultInitialize(false), - NonTrivialToPrimitiveCopy(false), NonTrivialToPrimitiveDestroy(false) { + NonTrivialToPrimitiveCopy(false), NonTrivialToPrimitiveDestroy(false), + CanPassInRegisters(true) { assert(classof(static_cast<Decl*>(this)) && "Invalid Kind!"); } |