summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 9228d65250c..f650e046c0d 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -15465,13 +15465,8 @@ void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl,
Record->setNonTrivialToPrimitiveDestroy(true);
Record->setParamDestroyedInCallee(true);
}
-
- if (const auto *RT = FT->getAs<RecordType>()) {
- if (RT->getDecl()->getArgPassingRestrictions() ==
- RecordDecl::APK_CanNeverPassInRegs)
- Record->setArgPassingRestrictions(RecordDecl::APK_CanNeverPassInRegs);
- } else if (FT.getQualifiers().getObjCLifetime() == Qualifiers::OCL_Weak)
- Record->setArgPassingRestrictions(RecordDecl::APK_CanNeverPassInRegs);
+ if (!FT.canPassInRegisters())
+ Record->setCanPassInRegisters(false);
}
if (Record && FD->getType().isVolatileQualified())
OpenPOWER on IntegriCloud