File: value-update.sil

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (45 lines) | stat: -rw-r--r-- 1,918 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// RUN: %target-swift-frontend %s -emit-ir -module-name test -g -o - | %FileCheck %s
// REQUIRES: CPU=x86_64
sil_stage canonical

import Builtin
import Swift
import SwiftShims

// test.foo () -> ()
sil @_TF4test3fooFT_T_ : $@convention(thin) () -> () {
bb0:
  %1 = integer_literal $Builtin.Int64, 23
  %2 = struct $Int (%1 : $Builtin.Int64)
  debug_value %2 : $Int, var, name "v"
  // CHECK: call void @llvm.dbg.value(metadata i64 23,
  // function_ref StdlibUnittest._blackHole <A> (A) -> ()
  %5 = function_ref @_TF14StdlibUnittest10_blackHoleurFxT_ : $@convention(thin) <τ_0_0> (@in τ_0_0) -> () // user: %8
  %6 = tuple ()
  %7 = alloc_stack $()                            // users: %8, %9
  %8 = apply %5<()>(%7) : $@convention(thin) <τ_0_0> (@in τ_0_0) -> ()
  dealloc_stack %7 : $*()        // id: %9

  // CHECK: call void @llvm.dbg.value(metadata i64 42,
  %9 = integer_literal $Builtin.Int64, 42         // user: %10
  %10 = struct $Int (%9 : $Builtin.Int64)         // user: %11
  debug_value %10 : $Int, var, name "v"

  // function_ref StdlibUnittest._blackHole <A> (A) -> ()
  %13 = function_ref @_TF14StdlibUnittest10_blackHoleurFxT_ : $@convention(thin) <τ_0_0> (@in τ_0_0) -> () // user: %16
  %14 = tuple ()
  %15 = alloc_stack $()                           // users: %16, %17
  %16 = apply %13<()>(%15) : $@convention(thin) <τ_0_0> (@in τ_0_0) -> ()
  dealloc_stack %15 : $*()       // id: %17

  %18 = tuple ()                                  // user: %21
  return %18 : $()                                // id: %21
  // CHECK: {{^}}}
}

// Swift.Int.init (_builtinIntegerLiteral : Builtin.IntLiteral) -> Swift.Int
sil [transparent] [serialized] @_TFSiCfT22_builtinIntegerLiteralBI__Si : $@convention(thin) (Builtin.IntLiteral, @thin Int.Type) -> Int

// StdlibUnittest._blackHole <A> (A) -> ()
sil @_TF14StdlibUnittest10_blackHoleurFxT_ : $@convention(thin) <τ_0_0> (@in τ_0_0) -> ()