Files
swift-mirror/test/SILOptimizer/castoptimizer-wrongscope.swift
Davidino Italiano 12ee5d3b48 [CastOptimizer] Set the correct debug scope for the SILBuilder.
This is a recommit with a change to only run the test for
optimized stdlib [as the bug reproduces only there [as the bug reproduces only there]
2019-06-17 08:33:29 -07:00

15 lines
532 B
Swift

// REQUIRES: optimized_stdlib
// RUN: %target-swift-frontend -emit-sil -o /dev/null \
// RUN: %s -Xllvm -sil-print-debuginfo -Onone -sil-verify-all \
// RUN: -Xllvm -sil-print-after=diagnostic-constant-propagation \
// RUN: 2>&1 | %FileCheck %s
// CHECK: alloc_stack $R, loc {{.*}}, scope 2
// CHECK-NEXT: init_existential_addr {{.*}} : $*R, $Float, loc {{.*}}, scope 2
// CHECK-NEXT: copy_addr [take] %8 to [initialization] %66 : $*Float, loc {{.*}}, scope 2
protocol R {}
extension Float: R {}
print(1.0 as Float? as! R)