r374416 - Update clang tests for new LLVM IR backslash printing in r374415

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 10 11:36:41 PDT 2019


Author: rnk
Date: Thu Oct 10 11:36:41 2019
New Revision: 374416

URL: http://llvm.org/viewvc/llvm-project?rev=374416&view=rev
Log:
Update clang tests for new LLVM IR backslash printing in r374415

Modified:
    cfe/trunk/test/CodeGen/debug-prefix-map.c
    cfe/trunk/test/CodeGen/string-literal.c
    cfe/trunk/test/CodeGen/ubsan-strip-path-components.cpp
    cfe/trunk/test/Driver/darwin-debug-flags.c
    cfe/trunk/test/Profile/gcc-flag-compatibility.c

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=374416&r1=374415&r2=374416&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-prefix-map.c (original)
+++ cfe/trunk/test/CodeGen/debug-prefix-map.c Thu Oct 10 11:36:41 2019
@@ -16,7 +16,7 @@ void test_rewrite_includes() {
   vprintf("string", argp);
 }
 
-// CHECK-NO-MAIN-FILE-NAME: !DIFile(filename: "/UNLIKELY_PATH/empty{{/|\\5C}}<stdin>"
+// CHECK-NO-MAIN-FILE-NAME: !DIFile(filename: "/UNLIKELY_PATH/empty{{/|\\\\}}<stdin>"
 // CHECK-NO-MAIN-FILE-NAME: !DIFile(filename: "/UNLIKELY_PATH/empty{{[/\\]}}{{.*}}",
 // On POSIX systems "Dir" should actually be empty, but on Windows we
 // can't recognize "/UNLIKELY_PATH" as being an absolute path.

Modified: cfe/trunk/test/CodeGen/string-literal.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/string-literal.c?rev=374416&r1=374415&r2=374416&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/string-literal.c (original)
+++ cfe/trunk/test/CodeGen/string-literal.c Thu Oct 10 11:36:41 2019
@@ -85,7 +85,7 @@ int main() {
   // CHECK-CXX11: private unnamed_addr constant [3 x i32] [i32 75, i32 76, i32 0], align 4
   const wchar_t *l = LR"bar(KL)bar";
 
-  // CHECK-CXX11: private unnamed_addr constant [9 x i8] c"abc\5Cndef\00", align 1
+  // CHECK-CXX11: private unnamed_addr constant [9 x i8] c"abc\\ndef\00", align 1
   const char *m = R"(abc\ndef)";
 
   // CHECK-CXX11: private unnamed_addr constant [8 x i8] c"abc\0Adef\00", align 1
@@ -96,13 +96,13 @@ def)";
   const char *q = R"(abc
 def)" "ghi";
 
-  // CHECK-CXX11: private unnamed_addr constant [13 x i8] c"abc\5C\0A??=\0Adef\00", align 1
+  // CHECK-CXX11: private unnamed_addr constant [13 x i8] c"abc\\\0A??=\0Adef\00", align 1
   const char *r = R\
 "(abc\
 ??=
 def)";
 
-  // CHECK-CXX11: private unnamed_addr constant [13 x i8] c"def\5C\0A??=\0Aabc\00", align 1
+  // CHECK-CXX11: private unnamed_addr constant [13 x i8] c"def\\\0A??=\0Aabc\00", align 1
   const char *s = u8R\
 "(def\
 ??=

Modified: cfe/trunk/test/CodeGen/ubsan-strip-path-components.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ubsan-strip-path-components.cpp?rev=374416&r1=374415&r2=374416&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ubsan-strip-path-components.cpp (original)
+++ cfe/trunk/test/CodeGen/ubsan-strip-path-components.cpp Thu Oct 10 11:36:41 2019
@@ -10,13 +10,13 @@
 // RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -emit-llvm -fsanitize=unreachable -o - -fsanitize-undefined-strip-path-components=-2 | FileCheck %s -check-prefix=LAST-TWO
 // RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -emit-llvm -fsanitize=unreachable -o - -fsanitize-undefined-strip-path-components=-1 | FileCheck %s -check-prefix=LAST-ONLY
 
-// REGULAR: @[[SRC:[0-9.a-zA-Z_]+]] =      private unnamed_addr constant [{{.*}} x i8] c"{{.*test(.|\\5C)CodeGen(.|\\5C)ubsan-strip-path-components\.cpp}}\00", align 1
+// REGULAR: @[[SRC:[0-9.a-zA-Z_]+]] =      private unnamed_addr constant [{{.*}} x i8] c"{{.*test(.|\\\\)CodeGen(.|\\\\)ubsan-strip-path-components\.cpp}}\00", align 1
 
-// First path component: "/" or "$drive_letter:", then a name, or '\5C' on Windows
-// REMOVE-FIRST-TWO: @[[STR:[0-9.a-zA-Z_]+]] = private unnamed_addr constant [{{.*}} x i8] c"{{(.:|/)([^\\/]*(/|\\5C))}}[[REST:.*ubsan-strip-path-components\.cpp]]\00", align 1
+// First path component: "/" or "$drive_letter:", then a name, or '\\' on Windows
+// REMOVE-FIRST-TWO: @[[STR:[0-9.a-zA-Z_]+]] = private unnamed_addr constant [{{.*}} x i8] c"{{(.:|/)([^\\/]*(/|\\\\))}}[[REST:.*ubsan-strip-path-components\.cpp]]\00", align 1
 // REMOVE-FIRST-TWO: @[[SRC:[0-9.a-zA-Z_]+]] = private unnamed_addr constant [{{.*}} x i8] c"[[REST]]\00", align 1
 
-// LAST-TWO: @[[SRC:[0-9.a-zA-Z_]+]] =     private unnamed_addr constant [{{.*}} x i8] c"CodeGen{{/|\\5C}}ubsan-strip-path-components.cpp\00", align 1
+// LAST-TWO: @[[SRC:[0-9.a-zA-Z_]+]] =     private unnamed_addr constant [{{.*}} x i8] c"CodeGen{{/|\\\\}}ubsan-strip-path-components.cpp\00", align 1
 // LAST-ONLY: @[[SRC:[0-9.a-zA-Z_]+]] =    private unnamed_addr constant [{{.*}} x i8] c"ubsan-strip-path-components.cpp\00", align 1
 
 // CHECK: @[[STATIC_DATA:[0-9.a-zA-Z_]+]] = private unnamed_addr global { { [{{.*}} x i8]*, i32, i32 } } { { [{{.*}} x i8]*, i32, i32 } { [{{.*}} x i8]* @[[SRC]], i32 [[@LINE+6]], i32 3 } }

Modified: cfe/trunk/test/Driver/darwin-debug-flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-debug-flags.c?rev=374416&r1=374415&r2=374416&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-debug-flags.c (original)
+++ cfe/trunk/test/Driver/darwin-debug-flags.c Thu Oct 10 11:36:41 2019
@@ -7,7 +7,7 @@
 
 // CHECK: distinct !DICompileUnit(
 // CHECK-SAME:                flags:
-// CHECK-SAME:                -I path\5C with\5C \5C\5Cspaces
+// CHECK-SAME:                -I path\\ with\\ \\\\spaces
 // CHECK-SAME:                -g -Os
 // CHECK-SAME:                -mmacosx-version-min=10.5.0
 

Modified: cfe/trunk/test/Profile/gcc-flag-compatibility.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Profile/gcc-flag-compatibility.c?rev=374416&r1=374415&r2=374416&view=diff
==============================================================================
--- cfe/trunk/test/Profile/gcc-flag-compatibility.c (original)
+++ cfe/trunk/test/Profile/gcc-flag-compatibility.c Thu Oct 10 11:36:41 2019
@@ -15,7 +15,7 @@
 // Check that -fprofile-generate=/path/to generates /path/to/default.profraw
 // RUN: %clang %s -c -S -o - -emit-llvm -fprofile-generate=/path/to -fno-experimental-new-pass-manager | FileCheck -check-prefixes=PROFILE-GEN,PROFILE-GEN-EQ %s
 // RxUN: %clang %s -c -S -o - -emit-llvm -fprofile-generate=/path/to -fexperimental-new-pass-manager | FileCheck -check-prefixes=PROFILE-GEN,PROFILE-GEN-EQ %s
-// PROFILE-GEN-EQ: constant [{{.*}} x i8] c"/path/to{{/|\\5C}}{{.*}}\00"
+// PROFILE-GEN-EQ: constant [{{.*}} x i8] c"/path/to{{/|\\\\}}{{.*}}\00"
 
 // Check that -fprofile-use=some/path reads some/path/default.profdata
 // This uses Clang FE format profile.




More information about the cfe-commits mailing list