Skip to content

Commit a8bcf59

Browse files
committed
---
yaml --- r: 323447 b: refs/heads/tensorflow-next c: 46bb4b1 h: refs/heads/master i: 323445: 652345f 323443: 1c42b8f 323439: 44420ad
1 parent 535becc commit a8bcf59

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,4 +1461,4 @@ refs/heads/master-rebranch: 86e95c23aa0d37f24ec138b7853146c1cead2e40
14611461
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
14621462
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
14631463
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec
1464-
refs/heads/tensorflow-next: 571227677ca32d46710c42a09a219f42e5eaa15b
1464+
refs/heads/tensorflow-next: 46bb4b101771795d519c0eb8481058aef5945453

branches/tensorflow-next/include/swift/ABI/Metadata.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,11 @@ struct TargetTupleTypeMetadata : public TargetMetadata<Runtime> {
14951495
ConstTargetMetadataPointer<Runtime, swift::TargetMetadata> Type;
14961496

14971497
/// The offset of the tuple element within the tuple.
1498+
#if __APPLE__
14981499
StoredSize Offset;
1500+
#else
1501+
uint32_t Offset;
1502+
#endif
14991503

15001504
OpaqueValue *findIn(OpaqueValue *tuple) const {
15011505
return (OpaqueValue*) (((char*) tuple) + Offset);
@@ -1506,6 +1510,9 @@ struct TargetTupleTypeMetadata : public TargetMetadata<Runtime> {
15061510
}
15071511
};
15081512

1513+
static_assert(sizeof(Element) == sizeof(StoredSize) * 2,
1514+
"element size should be two words");
1515+
15091516
Element *getElements() {
15101517
return reinterpret_cast<Element*>(this + 1);
15111518
}

branches/tensorflow-next/lib/IRGen/IRGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ IRGenModule::IRGenModule(IRGenerator &irgen,
266266
// A tuple type metadata record has a couple extra fields.
267267
auto tupleElementTy = createStructType(*this, "swift.tuple_element_type", {
268268
TypeMetadataPtrTy, // Metadata *Type;
269-
SizeTy // size_t Offset;
269+
Int32Ty // int32_t Offset;
270270
});
271271
TupleTypeMetadataPtrTy = createStructPointerType(*this, "swift.tuple_type", {
272272
TypeMetadataStructTy, // (base)

branches/tensorflow-next/test/IRGen/generic_tuples.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// CHECK: [[TYPE:%swift.type]] = type {
1010
// CHECK: [[OPAQUE:%swift.opaque]] = type opaque
1111
// CHECK: [[TUPLE_TYPE:%swift.tuple_type]] = type { [[TYPE]], i64, i8*, [0 x %swift.tuple_element_type] }
12-
// CHECK: %swift.tuple_element_type = type { [[TYPE]]*, i64 }
12+
// CHECK: %swift.tuple_element_type = type { [[TYPE]]*, i32 }
1313

1414
func dup<T>(_ x: T) -> (T, T) { var x = x; return (x,x) }
1515
// CHECK: define hidden swiftcc void @"$s14generic_tuples3dupyx_xtxlF"(%swift.opaque* noalias nocapture, %swift.opaque* noalias nocapture, %swift.opaque* noalias nocapture, %swift.type* %T)

0 commit comments

Comments
 (0)