Skip to content

Commit 64f9165

Browse files
committed
Cover ClangImporter changes for ptrauth qualified structs with a flag
1 parent a9ac679 commit 64f9165

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,9 @@ namespace {
20432043
// C structs. That'll require some SIL and IRGen work, though.
20442044
if (decl->isNonTrivialToPrimitiveCopy() ||
20452045
decl->isNonTrivialToPrimitiveDestroy()) {
2046-
isNonTrivialPtrAuth = isNonTrivialDueToAddressDiversifiedPtrAuth(decl);
2046+
isNonTrivialPtrAuth = Impl.SwiftContext.SILOpts
2047+
.EnableImportPtrauthFieldFunctionPointers &&
2048+
isNonTrivialDueToAddressDiversifiedPtrAuth(decl);
20472049
if (!isNonTrivialPtrAuth) {
20482050
// Note that there is a third predicate related to these,
20492051
// isNonTrivialToPrimitiveDefaultInitialize. That one's not important

0 commit comments

Comments
 (0)