r268797 - Fix sysroot-prefix.c on Windows (/ vs \).

Yaron Keren via cfe-commits cfe-commits at lists.llvm.org
Fri May 6 14:43:06 PDT 2016


Hi Nico,

In other tests, {{/|\\\\}} or {{/|\\}} are used match the forward or
backward slash(es). clang escapes \ so we get two of them in output and
four in the LIT test.

It would be nice to have more elegant construct for this general problem,
to avoid tests like:

"{{.*}}/Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}mingw32{{/|\\\\}}4.8.1{{/|\\\\}}include{{/|\\\\}}c++"

maybe having FileCheck allow  / match \ when running under Windows?

Yaron


2016-05-07 0:17 GMT+03:00 Nico Weber via cfe-commits <
cfe-commits at lists.llvm.org>:

> Author: nico
> Date: Fri May  6 16:17:32 2016
> New Revision: 268797
>
> URL: http://llvm.org/viewvc/llvm-project?rev=268797&view=rev
> Log:
> Fix sysroot-prefix.c on Windows (/ vs \).
>
> Modified:
>     cfe/trunk/test/Preprocessor/sysroot-prefix.c
>
> Modified: cfe/trunk/test/Preprocessor/sysroot-prefix.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/sysroot-prefix.c?rev=268797&r1=268796&r2=268797&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Preprocessor/sysroot-prefix.c (original)
> +++ cfe/trunk/test/Preprocessor/sysroot-prefix.c Fri May  6 16:17:32 2016
> @@ -14,12 +14,12 @@
>  // CHECK-NO_ISYSROOT_SYSROOT_DEV_NULL: ignoring nonexistent directory
> "=/var/empty/include"
>  // CHECK-NO_ISYSROOT_SYSROOT_DEV_NULL-NOT: ignoring nonexistent directory
> "/var/empty/include"
>
> -// CHECK-ISYSROOT_SYSROOT_NULL: ignoring nonexistent directory
> "/var/empty/null"
> +// CHECK-ISYSROOT_SYSROOT_NULL: ignoring nonexistent directory
> "/var/empty{{.}}null"
>  // CHECK-ISYSROOT_SYSROOT_NULL-NOT: ignoring nonexistent directory "=null"
>
> -// CHECK-ISYSROOT_ISYSROOT_SYSROOT_NULL: ignoring nonexistent directory
> "/var/empty/root/null"
> +// CHECK-ISYSROOT_ISYSROOT_SYSROOT_NULL: ignoring nonexistent directory
> "/var/empty/root{{.}}null"
>  // CHECK-ISYSROOT_ISYSROOT_SYSROOT_NULL-NOT: ignoring nonexistent
> directory "=null"
>
> -// CHECK-ISYSROOT_ISYSROOT_SWAPPED_SYSROOT_NULL: ignoring nonexistent
> directory "/var/empty/null"
> +// CHECK-ISYSROOT_ISYSROOT_SWAPPED_SYSROOT_NULL: ignoring nonexistent
> directory "/var/empty{{.}}null"
>  // CHECK-ISYSROOT_ISYSROOT_SWAPPED_SYSROOT_NULL-NOT: ignoring nonexistent
> directory "=null"
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160507/61dd9321/attachment.html>


More information about the cfe-commits mailing list