]> 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 22:48:22 +0000 (22:48 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Mon, 9 Apr 2018 22:48:22 +0000 (22:48 +0000)
commita7ab7e151c37d12104e563521885fed0e2075a9c
tree7749f608c9724611cefd97066354e390c1c43d2e
parent761af913a314741d8b1bd72e19c81f3f5d4f1190
[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.

This reapplies r329617. r329617 didn't specify the underlying type for
enum ArgPassingKind, which caused regression tests to fail on a windows
bot.

rdar://problem/39194693

Differential Revision: https://reviews.llvm.org/D45384

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329635 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