Files
swift-mirror/test/CAS/loc-directive-diagnostics.swift
Steven Wu b78b569450 [CAS] Consolidate compile cache flags
Rename `-enable-cas` to `-compile-cache-job` to align with clang option
names and promote that to a new driver only flag.

Few other additions to driver flag for caching behaviors:
* `-compile-cache-remarks`: now cache hit/miss remarks are guarded behind
  this flag
* `-compile-cache-skip`: skip replaying from the cache. Useful as a
  debugging tool to do the compilation using CAS inputs even the output
  is a hit from the cache.
2023-06-26 10:34:27 -07:00

16 lines
922 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/test.module \
// RUN: -cache-compile-job -cas-path %t/cas -allow-unstable-cache-key-for-testing %s 2>&1 | %FileCheck %s
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-output-keys -- \
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/test.module -cache-compile-job -cas-path %t/cas \
// RUN: -allow-unstable-cache-key-for-testing %s > %t/cache_key.json
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action render-diags %t/cache_key.json -- \
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/test.module -cache-compile-job -cas-path %t/cas \
// RUN: -allow-unstable-cache-key-for-testing %s 2>&1 | %FileCheck %s
#sourceLocation(file: "anything.swift", line: 1)
#warning("this is a warning")
#sourceLocation()
// CHECK: anything.swift:1:10: warning: this is a warning