Files
swift-mirror/test/DebugInfo/top_level_code.swift
Max Desiatov 22e68a3aff test/DebugInfo: enable all available tests for Wasm (#86742)
Wasm is the only 32-bit platform regularly tested on Swift CI, let's enable existing `DebugInfo` tests for it.
2026-01-23 17:36:20 -08:00

14 lines
426 B
Swift

// RUN: %target-swift-frontend %s -S -g -o - | %FileCheck %s
func markUsed<T>(_ t: T) {}
// CHECK: {{_?_?}}main{{(_argc_argv)?}}:
// CHECK: Lfunc_begin0:
// Verify that the top-level function (main) begins at line 0 and then
// proceeds to the first line.
// CHECK: .loc {{[0-9]}} 0 {{[0-9]}}
// CHECK-NOT: Lfunc_end0:
// CHECK: .loc {{[0-9]+}} {{[1-9][0-9]*}} {{[0-9]+}} prologue_end
var a = 1
var b = 2
markUsed(a+b)