Skip to content

Commit 461e909

Browse files
committed
Fix objcImplementattion and non-Darwin builds
1 parent eaa25a1 commit 461e909

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/IRGen/GenMeta.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3638,6 +3638,9 @@ namespace {
36383638
}
36393639

36403640
void addLayoutStringPointer() {
3641+
if (asImpl().getFieldLayout().hasObjCImplementation())
3642+
return;
3643+
36413644
if (auto *layoutString = getLayoutString()) {
36423645
B.add(layoutString);
36433646
} else {

stdlib/public/runtime/ErrorObjectNative.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static SWIFT_CC(swift) void _destroyErrorObject(SWIFT_CONTEXT HeapObject *obj) {
6060

6161
/// Heap metadata for Error boxes.
6262
static const FullMetadata<HeapMetadata> ErrorMetadata{
63-
HeapMetadataHeader{{_destroyErrorObject}, {&VALUE_WITNESS_SYM(Bo)}},
63+
HeapMetadataHeader{{nullptr}, {_destroyErrorObject}, {&VALUE_WITNESS_SYM(Bo)}},
6464
HeapMetadata(MetadataKind::ErrorObject),
6565
};
6666

0 commit comments

Comments
 (0)