Skip to content

Commit e427357

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-next
2 parents 13e0ca1 + 532e20e commit e427357

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/SILGen/SILGenExpr.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,9 +1264,8 @@ RValue RValueEmitter::visitDerivedToBaseExpr(DerivedToBaseExpr *E,
12641264
if (original.getType() == loweredResultTy)
12651265
return RValue(SGF, E, original);
12661266

1267-
SILValue converted = SGF.B.createUpcast(E, original.getValue(),
1268-
loweredResultTy);
1269-
return RValue(SGF, E, ManagedValue(converted, original.getCleanup()));
1267+
ManagedValue converted = SGF.B.createUpcast(E, original, loweredResultTy);
1268+
return RValue(SGF, E, converted);
12701269
}
12711270

12721271
RValue RValueEmitter::visitMetatypeConversionExpr(MetatypeConversionExpr *E,

lib/SILOptimizer/Mandatory/AddressLowering.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
#include "swift/SILOptimizer/Utils/Local.h"
100100
#include "llvm/ADT/DenseMap.h"
101101
#include "llvm/ADT/SetVector.h"
102+
#include "llvm/Support/CommandLine.h"
102103
#include "llvm/Support/Debug.h"
103104

104105
using namespace swift;

test/SILGen/objc_ownership_conventions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func test10(_ g: Gizmo) -> AnyClass {
147147
// CHECK-NEXT: [[THICK:%.*]] = objc_to_thick_metatype [[OBJC]]
148148
// CHECK: [[T0:%.*]] = enum $Optional<@thick AnyObject.Type>, #Optional.some!enumelt.1, [[THICK]]
149149
// CHECK: bb5([[RES:%.*]] : $@thick AnyObject.Type):
150-
// CHECK: destroy_value [[G_COPY]] : $Gizmo
150+
// CHECK: destroy_value [[NS_G_COPY]] : $NSObject
151151
// CHECK: destroy_value [[G]] : $Gizmo
152152
// CHECK-NEXT: return [[RES]] : $@thick AnyObject.Type
153153
return g.classProp
@@ -169,7 +169,7 @@ func test11(_ g: Gizmo) -> AnyClass {
169169
// CHECK: bb5([[RES:%.*]] : $@thick NSAnsing.Type):
170170
// CHECK: [[OPENED:%.*]] = open_existential_metatype [[RES]]
171171
// CHECK: [[RES_ANY:%.*]] = init_existential_metatype [[OPENED]]
172-
// CHECK: destroy_value [[G_COPY]] : $Gizmo
172+
// CHECK: destroy_value [[NS_G_COPY]] : $NSObject
173173
// CHECK: destroy_value [[G]] : $Gizmo
174174
// CHECK-NEXT: return [[RES_ANY]] : $@thick AnyObject.Type
175175
return g.qualifiedClassProp

0 commit comments

Comments
 (0)