[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / baremetal-multilib-exclusive-group.yaml
blob8f9e2900f92711a7457dd3597eec89c2439e3f7e
1 # UNSUPPORTED: system-windows
3 # RUN: %clang --multi-lib-config=%s -no-canonical-prefixes -x c++ %s -### -o %t.out --target=thumbv7em-none-unknown-eabi --sysroot= 2>%t.err
5 # RUN: FileCheck %s < %t.err --check-prefix=POS
6 # RUN: FileCheck %s < %t.err --check-prefix=NEG
8 # Expected results:
10 # Due to the Mappings section, all six of these library directories should
11 # match the command-line flag --target=thumbv7em-none-unknown-eabi.
13 # The two "non_exclusive" directories, which don't have an ExclusiveGroup at
14 # all, should both be selected. So should the two "own_group", each of which
15 # specifies a different value of ExclusiveGroup. But the three "exclusive",
16 # which have the _same_ ExclusiveGroup value, should not: the third one wins.
17 # So we expect five of these seven directories to show up in the clang-cc1
18 # command line, but not testdir1_exclusive or testdir2_exclusive.
20 # POS-DAG: "-internal-isystem" "[[SYSROOT:[^"]*]]/bin/../lib/clang-runtimes/testdir1_non_exclusive/include/c++/v1"
21 # POS-DAG: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/testdir2_non_exclusive/include/c++/v1"
22 # POS-DAG: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/testdir3_exclusive/include/c++/v1"
23 # POS-DAG: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/testdir1_own_group/include/c++/v1"
24 # POS-DAG: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/testdir2_own_group/include/c++/v1"
26 # NEG-NOT: "-internal-isystem" "{{[^"]*}}/bin/../lib/clang-runtimes/testdir1_exclusive/include/c++/v1"
27 # NEG-NOT: "-internal-isystem" "{{[^"]*}}/bin/../lib/clang-runtimes/testdir2_exclusive/include/c++/v1"
29 ---
30 MultilibVersion: 1.0
32 Groups:
33 - Name: actually_exclude_something
34   Type: Exclusive
36 - Name: foo
37   Type: Exclusive
39 - Name: bar
40   Type: Exclusive
42 Variants:
43 - Dir: testdir1_non_exclusive
44   Flags: [--target=thumbv7m-none-unknown-eabi]
46 - Dir: testdir2_non_exclusive
47   Flags: [--target=thumbv7em-none-unknown-eabi]
49 - Dir: testdir1_exclusive
50   Flags: [--target=thumbv7m-none-unknown-eabi]
51   Group: actually_exclude_something
53 - Dir: testdir2_exclusive
54   Flags: [--target=thumbv7em-none-unknown-eabi]
55   Group: actually_exclude_something
57 - Dir: testdir3_exclusive
58   Flags: [--target=thumbv7em-none-unknown-eabi]
59   Group: actually_exclude_something
61 - Dir: testdir1_own_group
62   Flags: [--target=thumbv7m-none-unknown-eabi]
63   Group: foo
65 - Dir: testdir2_own_group
66   Flags: [--target=thumbv7em-none-unknown-eabi]
67   Group: bar
69 Mappings:
70 - Match: --target=thumbv7em-none-unknown-eabi
71   Flags: [--target=thumbv7m-none-unknown-eabi]