Files
swift-mirror/test/DebugInfo/scope-closure.swift
Erik Eckstein 39bb14b094 change mangling prefix from $S to $s
This is the final ABI mangling prefix

rdar://problem/38471478
2018-09-19 13:55:11 -07:00

11 lines
424 B
Swift

// RUN: %target-swift-frontend -emit-ir -g %s -o - | %FileCheck %s
//
// A top-level closure is expected to have the main module as scope and not the
// top_level_code function.
//
// CHECK: define {{.*}}@"$s4mainSiycfU_"() {{.*}} !dbg ![[CLOSURE:[0-9]+]] {
// CHECK: ![[MOD:[0-9]+]] = !DIModule(scope: null, name: "main"
// CHECK: ![[CLOSURE]] = distinct !DISubprogram({{.*}}scope: ![[MOD]],
let closure = { 42 }
closure()