forked from OSchip/llvm-project
Update clang tests for new LLVM IR backslash printing in r374415
llvm-svn: 374416
This commit is contained in:
parent
67d440b949
commit
63bb6737ce
|
@ -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.
|
||||
|
|
|
@ -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\
|
||||
??=
|
||||
|
|
|
@ -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 } }
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue