Skip to content

Commit 32a4783

Browse files
committed
---
yaml --- r: 348126 b: refs/heads/master c: 8084259 h: refs/heads/master
1 parent 572894c commit 32a4783

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 23a671bce4c0e87ef82b7480616629717d027875
2+
refs/heads/master: 8084259bf3d601e96009da0a296099e555e7c202
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/SILOptimizer/Utils/CastOptimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1572,7 +1572,7 @@ static bool optimizeStaticallyKnownProtocolConformance(
15721572
if (!Conformance)
15731573
return false;
15741574

1575-
SILBuilder B(Inst);
1575+
SILBuilderWithScope B(Inst);
15761576
SmallVector<ProtocolConformanceRef, 1> NewConformances;
15771577
NewConformances.push_back(Conformance.getValue());
15781578
ArrayRef<ProtocolConformanceRef> Conformances =
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: %target-swift-frontend -emit-sil -o /dev/null \
2+
// RUN: %s -Xllvm -sil-print-debuginfo -Onone -sil-verify-all \
3+
// RUN: -Xllvm -sil-print-after=diagnostic-constant-propagation \
4+
// RUN: 2>&1 | %FileCheck %s
5+
6+
// CHECK: alloc_stack $R, loc {{.*}}, scope 2
7+
// CHECK-NEXT: init_existential_addr {{.*}} : $*R, $Float, loc {{.*}}, scope 2
8+
// CHECK-NEXT: copy_addr [take] %8 to [initialization] %66 : $*Float, loc {{.*}}, scope 2
9+
10+
protocol R {}
11+
extension Float: R {}
12+
print(1.0 as Float? as! R)

0 commit comments

Comments
 (0)