aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2018-04-09 20:39:47 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2018-04-09 20:39:47 +0000
commitf15d29ccc7fa62b78c38d6ba2798da8646e4ca60 (patch)
tree7a8fa782537a522b486d280f141bc8d9b4b9c126 /clang/lib/AST/Decl.cpp
parent47b2f9d836f8fbde3c70df18742270b36f5fe55d (diff)
downloadllvm-f15d29ccc7fa62b78c38d6ba2798da8646e4ca60.zip
llvm-f15d29ccc7fa62b78c38d6ba2798da8646e4ca60.tar.gz
llvm-f15d29ccc7fa62b78c38d6ba2798da8646e4ca60.tar.bz2
[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 llvm-svn: 329617
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index b49fda0..18ef94b 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -3956,7 +3956,7 @@ RecordDecl::RecordDecl(Kind DK, TagKind TK, const ASTContext &C,
LoadedFieldsFromExternalStorage(false),
NonTrivialToPrimitiveDefaultInitialize(false),
NonTrivialToPrimitiveCopy(false), NonTrivialToPrimitiveDestroy(false),
- CanPassInRegisters(true), ParamDestroyedInCallee(false) {
+ ParamDestroyedInCallee(false), ArgPassingRestrictions(APK_CanPassInRegs) {
assert(classof(static_cast<Decl*>(this)) && "Invalid Kind!");
}