mirror of
https://github.com/apple/swift.git
synced 2026-10-16 16:50:49 +02:00
Fix build using profile data by setting up profiling data correctly through the VFS layer. rdar://172295490
24 lines
1.1 KiB
Swift
24 lines
1.1 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %s %t
|
|
|
|
// RUN: %llvm-profdata merge %t/empty.proftext -o %t/default.profdata
|
|
|
|
// RUN: %target-swift-frontend -scan-dependencies -module-name Test -module-cache-path %t/clang-module-cache -O \
|
|
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import \
|
|
// RUN: %t/main.swift -o %t/deps.json -swift-version 5 -cache-compile-job -cas-path %t/cas -profile-use=%t/default.profdata \
|
|
// RUN: -scanner-prefix-map-paths %t /^tmp
|
|
|
|
// RUN: %{python} %S/../../utils/swift-build-modules.py --cas %t/cas %swift_frontend_plain %t/deps.json -o %t/Test.cmd
|
|
|
|
// RUN: %target-swift-frontend-plain -module-name Test -O \
|
|
// RUN: -c -o %t/main.o -cache-compile-job -cas-path %t/cas \
|
|
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import \
|
|
// RUN: /^tmp/main.swift @%t/Test.cmd -profile-use=/^tmp/default.profdata 2>&1 | %FileCheck %s --allow-empty
|
|
|
|
/// Missing profile data is manifested as a note, not an error. Check word inside diagnositics.
|
|
// CHECK-NOT: failed
|
|
|
|
//--- empty.proftext
|
|
//--- main.swift
|
|
func main() {}
|