r348211 - Relax tests to also work on Windows

Adrian Prantl via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 3 15:11:19 PST 2018


Author: adrian
Date: Mon Dec  3 15:11:19 2018
New Revision: 348211

URL: http://llvm.org/viewvc/llvm-project?rev=348211&view=rev
Log:
Relax tests to also work on Windows

Modified:
    cfe/trunk/test/CodeGen/debug-prefix-map.c
    cfe/trunk/test/Modules/module-debuginfo-prefix.m

Modified: cfe/trunk/test/CodeGen/debug-prefix-map.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-prefix-map.c?rev=348211&r1=348210&r2=348211&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-prefix-map.c (original)
+++ cfe/trunk/test/CodeGen/debug-prefix-map.c Mon Dec  3 15:11:19 2018
@@ -18,19 +18,21 @@ void test_rewrite_includes() {
 
 // CHECK-NO-MAIN-FILE-NAME: !DIFile(filename: "/var/empty{{/|\\5C}}<stdin>"
 // CHECK-NO-MAIN-FILE-NAME: !DIFile(filename: "/var/empty{{[/\\]}}{{.*}}",
-// CHECK-NO-MAIN-FILE-NAME-SAME:    directory: "")
+// Dir should always be empty, but on Windows we can't recognize /var
+// as being an absolute path.
+// CHECK-NO-MAIN-FILE-NAME-SAME:    directory: "{{()|(.*:.*)}}")
 // CHECK-NO-MAIN-FILE-NAME: !DIFile(filename: "/var/empty{{[/\\]}}Inputs/stdio.h",
-// CHECK-NO-MAIN-FILE-NAME-SAME:    directory: "")
+// CHECK-NO-MAIN-FILE-NAME-SAME:    directory: "{{()|(.*:.*)}}")
 // CHECK-NO-MAIN-FILE-NAME-NOT: !DIFile(filename:
 
 // CHECK-EVIL: !DIFile(filename: "/var=empty{{[/\\]}}{{.*}}"
 // CHECK-EVIL: !DIFile(filename: "/var=empty{{[/\\]}}{{.*}}Inputs/stdio.h",
-// CHECK-EVIL-SAME:    directory: "")
+// CHECK-EVIL-SAME:    directory: "{{()|(.*:.*)}}")
 // CHECK-EVIL-NOT: !DIFile(filename:
 
 // CHECK: !DIFile(filename: "/var/empty{{[/\\]}}{{.*}}"
 // CHECK: !DIFile(filename: "/var/empty{{[/\\]}}{{.*}}Inputs/stdio.h",
-// CHECK-SAME:    directory: "")
+// CHECK-SAME:    directory: "{{()|(.*:.*)}}")
 // CHECK-NOT: !DIFile(filename:
 
 // CHECK-COMPILATION-DIR: !DIFile(filename: "{{.*}}", directory: "/var/empty")

Modified: cfe/trunk/test/Modules/module-debuginfo-prefix.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/module-debuginfo-prefix.m?rev=348211&r1=348210&r2=348211&view=diff
==============================================================================
--- cfe/trunk/test/Modules/module-debuginfo-prefix.m (original)
+++ cfe/trunk/test/Modules/module-debuginfo-prefix.m Mon Dec  3 15:11:19 2018
@@ -20,4 +20,6 @@
 @import DebugObjC;
 #endif
 
-// CHECK: !DIFile(filename: "/OVERRIDE/DebugObjC.h", directory: "")
+// Dir should always be empty, but on Windows we can't recognize /var
+// as being an absolute path.
+// CHECK: !DIFile(filename: "/OVERRIDE/DebugObjC.h", directory: "{{()|(.*:.*)}}")




More information about the cfe-commits mailing list