Update clang tests for new LLVM IR backslash printing in r374415
authorReid Kleckner <rnk@google.com>
Thu, 10 Oct 2019 18:36:41 +0000 (18:36 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 10 Oct 2019 18:36:41 +0000 (18:36 +0000)
llvm-svn: 374416

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

index f755ba47a2913e5c2ae28ed6e7bbf2aa8d61637a..d6032a658c2e299c804d2fbf9b990bb7231cc27d 100644 (file)
@@ -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.
index c46018743620b2160bf5b57f4fc672583ab38ddc..6634872821045ba6617cbae663142d9a04615c14 100644 (file)
@@ -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\
 ??=
index 7a95324d128befba07d380335a3d69c3f0884841..7ab000785e1f8b5fb512125054644f611ec1a32a 100644 (file)
 // 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 } }
index e37680e7f94a1a48167f2c843dfe703ffa3d2953..79a7f48350f5ce27c0e432710dfddd2b5407a8eb 100644 (file)
@@ -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
 
index a378af9d34648ced31a512becd9a267f5bb64fb6..e3594b0ebc71cd55a55188effa6a818f956fb252 100644 (file)
@@ -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.