]> granicus.if.org Git - clang/commit
[ObjC++] Never pass structs that transitively contain __weak fields in
authorAkira Hatanaka <ahatanaka@apple.com>
Mon, 9 Apr 2018 20:39:47 +0000 (20:39 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Mon, 9 Apr 2018 20:39:47 +0000 (20:39 +0000)
commit189f54bbe75921a3ef69f3a66c3a2a4eebdc794a
tree2e83ac8286d09d93e452e887d7cd1579a3a59271
parentc79a7094b0cadc7820da5a16bee21b28c733e295
[ObjC++] Never pass structs that transitively contain __weak fields in
registers.

This patch fixes a bug in r328731 that caused structs transitively
containing __weak fields to be passed in registers. The patch replaces
the flag RecordDecl::CanPassInRegisters with a 2-bit enum that indicates
whether the struct or structs containing the struct are forced to be
passed indirectly.

rdar://problem/39194693

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329617 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Decl.h
include/clang/AST/Type.h
lib/AST/Decl.cpp
lib/AST/DeclCXX.cpp
lib/AST/Type.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriter.cpp
lib/Serialization/ASTWriterDecl.cpp
test/CodeGenObjCXX/objc-struct-cxx-abi.mm