mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
See also #33383 where this problem is better explained. MSVC doesn't seem to trigger the exception code when no frame pointers are generated. The only thing missing would be for interpreted code to have a more informative crash message. Add a new LLVM Lit feature with the value of the VisualStudioVersion environment variable (it seems to not change even for minor versions, so it is an easy way to figure out the 2017/2019 difference, even if updates are applied). Use the new feature in a XFAIL check in the test.
24 lines
572 B
Swift
24 lines
572 B
Swift
|
|
// RUN: echo %s > %t.filelist.txt
|
|
// RUN: not --crash %target-swift-frontend -interpret -filelist %t.filelist.txt 2>&1 | %FileCheck %s
|
|
|
|
// REQUIRES: executable_test
|
|
|
|
// UNSUPPORTED: OS=ios
|
|
// UNSUPPORTED: OS=tvos
|
|
// UNSUPPORTED: OS=watchos
|
|
|
|
// XFAIL: MSVC_VER=15.0
|
|
|
|
// CHECK: Stack dump:
|
|
// CHECK-NEXT: Program arguments:
|
|
// CHECK-NEXT: Swift version
|
|
// CHECK-NEXT: Contents of {{.*}}.filelist.txt:
|
|
// CHECK-NEXT: ---
|
|
// CHECK-NEXT: crash-in-user-code.swift
|
|
// CHECK-NEXT: ---
|
|
// CHECK-NEXT: While running user code "{{.*}}crash-in-user-code.swift"
|
|
|
|
let x: Int? = nil
|
|
x!
|