Author: Shoaib Meenai Date: 2023-08-30T14:39:00-07:00 New Revision: f41cd477361b1891ca2702b66a8a66915258f15b
URL: https://github.com/llvm/llvm-project/commit/f41cd477361b1891ca2702b66a8a66915258f15b DIFF: https://github.com/llvm/llvm-project/commit/f41cd477361b1891ca2702b66a8a66915258f15b.diff LOG: [Driver] Enable stdlibxx-isystem test on Windows With `%/t`, we can now compare `-###` output against the installtion dir without backslash escaping getting in the way. Having to check against the doubled-up backslashes is ugly, but it's the pattern used in lots of tests (including for things like debug info where an `-###` alternative that didn't escape backslashes wouldn't help). Added: Modified: clang/test/Driver/stdlibxx-isystem.cpp Removed: ################################################################################ diff --git a/clang/test/Driver/stdlibxx-isystem.cpp b/clang/test/Driver/stdlibxx-isystem.cpp index d4888984fdf115..cb23035559fb86 100644 --- a/clang/test/Driver/stdlibxx-isystem.cpp +++ b/clang/test/Driver/stdlibxx-isystem.cpp @@ -1,29 +1,28 @@ // Backslash escaping makes matching against the installation directory fail on // Windows. Temporarily disable the test there until we add an option to print // the installation directory unescaped. -// UNSUPPORTED: system-windows // By default, we should search for libc++ next to the driver. // RUN: mkdir -p %t/bin // RUN: mkdir -p %t/include/c++/v1 -// RUN: %clang -target aarch64-linux-gnu -ccc-install-dir %t/bin \ +// RUN: %clang -target aarch64-linux-gnu -ccc-install-dir %/t/bin \ // RUN: -stdlib=libc++ -fsyntax-only %s -### 2>&1 | \ // RUN: FileCheck -check-prefix=LIBCXX %s -// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %t/bin \ +// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %/t/bin \ // RUN: -stdlib=libc++ -fsyntax-only %s -### 2>&1 | \ // RUN: FileCheck -check-prefix=LIBCXX %s // LIBCXX: InstalledDir: [[INSTALLDIR:.+$]] -// LIBCXX: "-internal-isystem" "[[INSTALLDIR]]/../include/c++/v1" +// LIBCXX: "-internal-isystem" "[[INSTALLDIR]]{{/|\\\\}}..{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}v1" // Passing -stdlib++-isystem should suppress the default search. -// RUN: %clang -target aarch64-linux-gnu -ccc-install-dir %t/bin \ +// RUN: %clang -target aarch64-linux-gnu -ccc-install-dir %/t/bin \ // RUN: -stdlib++-isystem /tmp/foo -stdlib++-isystem /tmp/bar -stdlib=libc++ \ // RUN: -fsyntax-only %s -### 2>&1 | FileCheck -check-prefix=NODEFAULT %s -// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %t/bin \ +// RUN: %clang -target x86_64-apple-darwin -ccc-install-dir %/t/bin \ // RUN: -stdlib++-isystem /tmp/foo -stdlib++-isystem /tmp/bar -stdlib=libc++ \ // RUN: -fsyntax-only %s -### 2>&1 | FileCheck -check-prefix=NODEFAULT %s // NODEFAULT: InstalledDir: [[INSTALLDIR:.+$]] -// NODEFAULT-NOT: "-internal-isystem" "[[INSTALLDIR]]/../include/c++/v1" +// NODEFAULT-NOT: "-internal-isystem" "[[INSTALLDIR]]{{/|\\\\}}..{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}v1" // And we should add it as an -internal-isystem. // RUN: %clang -target aarch64-linux-gnu -ccc-install-dir %t/bin \ _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits