Skip to content

Commit 975401b

Browse files
committed
Reflection: Fix broken Linux build
For some reason, initializer lists are not supported by std::tuple in our Linux CI. Just call std::make_tuple() instead.
1 parent 91f4cbe commit 975401b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

include/swift/Remote/MetadataReader.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,8 @@ class MetadataReader {
499499
readInstanceSizeAndAlignmentFromClassMetadata(StoredPointer MetadataAddress) {
500500
auto superMeta = readMetadata(MetadataAddress);
501501
if (!superMeta || superMeta->getKind() != MetadataKind::Class)
502-
return {false, 0, 0};
502+
return std::make_tuple(false, 0, 0);
503+
503504
auto super = cast<TargetClassMetadata<Runtime>>(superMeta);
504505

505506
// See swift_initClassMetadata_UniversalStrategy()
@@ -513,17 +514,17 @@ class MetadataReader {
513514
// Grab the RO-data pointer. This part is not ABI.
514515
StoredPointer roDataPtr = readObjCRODataPtr(MetadataAddress);
515516
if (!roDataPtr)
516-
return false;
517+
return std::make_tuple(false, 0, 0);
517518

518519
auto address = roDataPtr + sizeof(uint32_t) * 2;
519520

520521
align = 16; // malloc alignment guarantee
521522

522523
if (!Reader->readInteger(RemoteAddress(address), &size))
523-
return {false, 0, 0};
524+
return std::make_tuple(false, 0, 0);
524525
}
525526

526-
return {true, size, align};
527+
return std::make_tuple(true, size, align);
527528
}
528529

529530
/// Given a remote pointer to metadata, attempt to turn it into a type.

0 commit comments

Comments
 (0)