summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriter.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/Serialization/ASTWriter.cpp
parent47b2f9d836f8fbde3c70df18742270b36f5fe55d (diff)
downloadbcm5719-llvm-f15d29ccc7fa62b78c38d6ba2798da8646e4ca60.tar.gz
bcm5719-llvm-f15d29ccc7fa62b78c38d6ba2798da8646e4ca60.zip
[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/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 3369a543685..7f1199f1b6c 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -5193,8 +5193,8 @@ void ASTWriter::WriteDeclUpdatesBlocks(RecordDataImpl &OffsetsRecord) {
case UPD_CXX_INSTANTIATED_CLASS_DEFINITION: {
auto *RD = cast<CXXRecordDecl>(D);
UpdatedDeclContexts.insert(RD->getPrimaryContext());
- Record.push_back(RD->canPassInRegisters());
Record.push_back(RD->isParamDestroyedInCallee());
+ Record.push_back(RD->getArgPassingRestrictions());
Record.AddCXXDefinitionData(RD);
Record.AddOffset(WriteDeclContextLexicalBlock(
*Context, const_cast<CXXRecordDecl *>(RD)));
OpenPOWER on IntegriCloud