llvm-project/clang/test/Driver/print-file-name.c
Louis Dionne 731264b0c2 [clang][NFC] Fix location of 2>&1 in a few -print tests
While it's apparently valid to place Bash redirections anywhere in a
command-line, it is by far most frequently placed last. This changes
a few tests that did not conform to this convention and which I
originally thought were wrong.

Differential Revision: https://reviews.llvm.org/D146155
2023-03-25 15:57:20 -04:00

20 lines
1.1 KiB
C

// Test that -print-file-name finds the correct file.
// RUN: %clang -print-file-name=share/asan_ignorelist.txt \
// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --target=x86_64-unknown-linux-gnu 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-RESOURCE-DIR %s
// CHECK-RESOURCE-DIR: resource_dir{{/|\\}}share{{/|\\}}asan_ignorelist.txt
// RUN: %clang -print-file-name=libclang_rt.builtins.a \
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
// RUN: --target=x86_64-unknown-linux-gnu 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-COMPILER-RT %s
// CHECK-COMPILER-RT: resource_dir_with_per_target_subdir{{/|\\}}lib{{/|\\}}x86_64-unknown-linux-gnu{{/|\\}}libclang_rt.builtins.a
// RUN: %clang -print-file-name=include/c++/v1 \
// RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxx_tree/usr/bin \
// RUN: --target=x86_64-unknown-linux-gnu 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR %s
// CHECK-INSTALL-DIR: basic_linux_libcxx_tree{{/|\\}}usr{{/|\\}}bin{{/|\\}}..{{/|\\}}include{{/|\\}}c++{{/|\\}}v1