mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Now that alloc_global is not wrongly optimized away, this instruction remains in the output.
21 lines
629 B
Swift
21 lines
629 B
Swift
// RUN: rm -rf %t; mkdir -p %t
|
|
// RUN: %target-swift-frontend -emit-module %S/Inputs/nontransparent.swift -O -sil-serialize-all -parse-stdlib -parse-as-library -emit-module -o %t/Swift.swiftmodule -module-name=Swift -module-link-name swiftCore
|
|
// RUN: %target-swift-frontend %s -O -I %t -emit-sil -o - | FileCheck %s
|
|
|
|
import Swift
|
|
|
|
// Make sure we inline everything.
|
|
|
|
// CHECK-LABEL: sil @main
|
|
// CHECK: bb0({{.*}}):
|
|
// CHECK-NEXT: alloc_global
|
|
// CHECK-NEXT: global_addr
|
|
// CHECK-NEXT: struct
|
|
// CHECK-NEXT: struct
|
|
// CHECK-NEXT: store
|
|
// CHECK-NEXT: integer_literal
|
|
// CHECK-NEXT: return
|
|
|
|
var a = doSomething()
|
|
a.isBConfused()
|