File: unit-one-sourcefile-remapped.swift

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (22 lines) | stat: -rw-r--r-- 1,195 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: rm -rf %t
// RUN: mkdir -p %t/BuildRoot && cd %t/BuildRoot
// RUN: %target-swift-frontend -index-store-path %t/idx -file-prefix-map %S=REMAPPED_SRC_ROOT -file-prefix-map %t=REMAPPED_OUT_DIR %s -o %t/file1.o -typecheck
// RUN: c-index-test core -print-unit %t/idx | %FileCheck %s --dump-input-filter all

// CHECK: file1.o-1AYKXZF3HH50A
// CHECK: --------
// CHECK: main-path: REMAPPED_SRC_ROOT{{/|\\}}unit-one-sourcefile-remapped.swift
// CHECK: work-dir: REMAPPED_OUT_DIR{{/|\\}}BuildRoot
// CHECK: out-file: REMAPPED_OUT_DIR{{/|\\}}file1.o
// CHECK: DEPEND START
// CHECK: Unit | system | Swift | {{BUILD_DIR|.*lib\\swift\\windows}}{{.*}}Swift.swiftmodule
// CHECK: DEPEND END


// Check round-trip remapping to make sure they're converted back to the local paths.
// RUN: c-index-test core -print-unit %t/idx -index-store-prefix-map REMAPPED_SRC_ROOT=%S -index-store-prefix-map  REMAPPED_OUT_DIR=%t | %FileCheck %s -check-prefix=ROUNDTRIP --dump-input-filter all

// ROUNDTRIP: file1.o-1AYKXZF3HH50A
// ROUNDTRIP: --------
// ROUNDTRIP: main-path: SOURCE_DIR{{/|\\}}test{{/|\\}}Index{{/|\\}}Store{{/|\\}}unit-one-sourcefile-remapped.swift
// ROUNDTRIP-NOT: work-dir: REMAPPED_OUT_DIR