Skip to content

Commit 7686f05

Browse files
committed
[cxx-interop] Ensure consistent checks for exportable fields
1 parent 9ed8b66 commit 7686f05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/IRGen/StructMetadataVisitor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#ifndef SWIFT_IRGEN_STRUCTMETADATALAYOUT_H
1818
#define SWIFT_IRGEN_STRUCTMETADATALAYOUT_H
1919

20+
#include "Field.h"
2021
#include "NominalMetadataVisitor.h"
2122
#include "swift/AST/IRGenOptions.h"
2223

@@ -64,8 +65,7 @@ template <class Impl> class StructMetadataVisitor
6465
// Struct field offsets.
6566
asImpl().noteStartOfFieldOffsets();
6667
for (VarDecl *prop : Target->getStoredProperties()) {
67-
if (!(prop->getClangDecl() &&
68-
prop->getFormalAccess() == AccessLevel::Private))
68+
if (isExportableField(prop))
6969
asImpl().addFieldOffset(prop);
7070
}
7171

0 commit comments

Comments
 (0)