blob: 7db14a1e31e4248a0d4de766f253f3bb0f9b65c2 [file] [log] [blame]
// RUN: %empty-directory(%t)
// RUN: cp %s %t/main.swift
// RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/PCMacroRuntime.swift %S/Inputs/SilentPlaygroundsRuntime.swift
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main -I=%t %t/PlaygroundSupport.o %t/main.swift
// RUN: %target-codesign %t/main
// RUN: %target-run %t/main | %FileCheck %s
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main2 -I=%t %t/PlaygroundSupport.o %t/main.swift
// RUN: %target-run %t/main | %FileCheck %s
// REQUIRES: executable_test
// XFAIL: *
// FIXME: rdar://problem/30234450 PCMacro tests fail on linux in optimized mode
// UNSUPPORTED: OS=linux-gnu
import PlaygroundSupport
#sourceLocation(file: "main.swift", line: 31)
func function3(_ x: Int) throws {
}
_ = try! function3(0)
// this test is XFAIL-ed due to the range not including throws
// CHECK: [34:1-34:22] pc before
// CHECK-NEXT: [31:1-31:32] pc before
// CHECK-NEXT: [31:1-31:32] pc after
// CHECK-NEXT: [34:1-34:22] pc after