Files
swift-mirror/test/DebugInfo/scope-closure.swift
Erik Eckstein 1d3724666f tests: convert about 400 tests to the new mangling by using the -new-mangling-for-tests option
When the new mangling is enabled permanently, the option can be removed from the RUN command lines again.
2017-01-24 15:27:45 -08:00

11 lines
454 B
Swift

// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -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 {{.*}}@_T04mainSiycfU_() {{.*}} !dbg ![[CLOSURE:[0-9]+]] {
// CHECK: ![[MOD:[0-9]+]] = !DIModule(scope: null, name: "main"
// CHECK: ![[CLOSURE]] = distinct !DISubprogram({{.*}}scope: ![[MOD]],
let closure = { 42 }
closure()