Skip to content

Commit 508af4b

Browse files
technicatedToma91
authored andcommitted
---
yaml --- r: 278267 b: refs/heads/swift-5.1-old-llvm-branch c: 3615b0e h: refs/heads/master i: 278265: 66ec988 278263: 876d293
1 parent 2f7c24f commit 508af4b

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-01-24-a: b6f62823aa5010b2ae53f15f72a57
12411241
refs/heads/marcrasi-astverifier-disable: 3fac766a23a77ebd0640296bfd7fc116ea60a4e0
12421242
refs/heads/revert-22227-a-tall-white-fountain-played: adfce60b2eaa54903ea189bed8a783bca609fa53
12431243
refs/heads/revert-22300-revert-22227-a-tall-white-fountain-played: 5f92040224df7dd4e618fdfb367349df64d8acad
1244-
refs/heads/swift-5.1-old-llvm-branch: bad2230ccdf2bbe49e2048305e8914b565598413
1244+
refs/heads/swift-5.1-old-llvm-branch: 3615b0ee4bff1a1092432ff36376da29ce08a3d7
12451245
refs/heads/swift-5.1-branch: 8060872acb4105d9655e020fe047e1ebcd77d0fb
12461246
refs/tags/swift-4.2.2-RELEASE: e429d1f1aaf59e69d38207a96e56265c7f6fccec
12471247
refs/tags/swift-5.0-DEVELOPMENT-SNAPSHOT-2019-02-02-a: 3e5a03d32ff3b1e9af90d6c1198c14f938379a6e

branches/swift-5.1-old-llvm-branch/lib/SILGen/SILGen.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,6 @@ class LLVM_LIBRARY_VISIBILITY SILGenModule : public ASTVisitor<SILGenModule> {
359359
CanType baseTy,
360360
bool forPropertyDescriptor);
361361

362-
KeyPathPatternComponent
363-
emitKeyPathComponentForTupleElement(unsigned tupleIndex, CanType baseTy);
364-
365362
/// Known functions for bridging.
366363
SILDeclRef getStringToNSStringFn();
367364
SILDeclRef getNSStringToStringFn();

branches/swift-5.1-old-llvm-branch/lib/SILGen/SILGenExpr.cpp

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3574,18 +3574,6 @@ SILGenModule::emitKeyPathComponentForDecl(SILLocation loc,
35743574
llvm_unreachable("unknown kind of storage");
35753575
}
35763576

3577-
KeyPathPatternComponent
3578-
SILGenModule::emitKeyPathComponentForTupleElement(unsigned tupleIndex,
3579-
CanType baseTy) {
3580-
assert(baseTy->is<TupleType>() && "baseTy is expected to be a TupleType");
3581-
3582-
auto elementTy = baseTy->getAs<TupleType>()
3583-
->getElementType(tupleIndex)
3584-
->getCanonicalType();
3585-
3586-
return KeyPathPatternComponent::forTupleElement(tupleIndex, elementTy);
3587-
}
3588-
35893577
RValue RValueEmitter::visitKeyPathExpr(KeyPathExpr *E, SGFContext C) {
35903578
if (E->isObjC()) {
35913579
return visit(E->getObjCStringLiteralExpr(), C);
@@ -3657,10 +3645,15 @@ RValue RValueEmitter::visitKeyPathExpr(KeyPathExpr *E, SGFContext C) {
36573645
}
36583646

36593647
case KeyPathExpr::Component::Kind::TupleElement: {
3648+
assert(baseTy->is<TupleType>() && "baseTy is expected to be a TupleType");
3649+
36603650
auto tupleIndex = component.getTupleIndex();
3651+
auto elementTy = baseTy->getAs<TupleType>()
3652+
->getElementType(tupleIndex)
3653+
->getCanonicalType();
3654+
36613655
loweredComponents.push_back(
3662-
SGF.SGM.emitKeyPathComponentForTupleElement(tupleIndex,
3663-
baseTy));
3656+
KeyPathPatternComponent::forTupleElement(tupleIndex, elementTy));
36643657

36653658
baseTy = loweredComponents.back().getComponentType();
36663659

0 commit comments

Comments
 (0)