Revision ac4b68fbf45853ba4b9e327cb42f93f42a8fa252 authored by Ellie Shin on 17 March 2023, 04:14:20 UTC, committed by Ellie Shin on 17 March 2023, 04:14:20 UTC
1 parent f2c68fb
Raw File
let.swift
// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | %FileCheck %s

class DeepThought {
  func query() -> Int64 { return 42 }
}

func foo() -> Int64 {
  // CHECK: call void @llvm.dbg.declare(metadata %T3let11DeepThoughtC** {{.*}}, metadata ![[A:.*]], metadata !DIExpression())
  // CHECK-DAG: !DILocalVariable(name: "machine",{{.*}}line: [[@LINE+1]], type: !{{[0-9]+}})
  let machine = DeepThought()
  // CHECK-DAG: !DILocalVariable(name: "a", {{.*}}line: [[@LINE+1]],
  let a = machine.query()
  return a
}
back to top