2018-12-08 01:57:44 +08:00
|
|
|
// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty %s -emit-llvm -o - | FileCheck %s -check-prefix CHECK-NO-MAIN-FILE-NAME
|
|
|
|
// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-prefix-map=%p=/UNLIKELY_PATH=empty %s -emit-llvm -o - | FileCheck %s -check-prefix CHECK-EVIL
|
|
|
|
// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty %s -emit-llvm -o - -main-file-name debug-prefix-map.c | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty %s -emit-llvm -o - -fdebug-compilation-dir %p | FileCheck %s -check-prefix CHECK-COMPILATION-DIR
|
2015-10-13 04:21:08 +08:00
|
|
|
|
|
|
|
#include "Inputs/stdio.h"
|
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
(void)argc;
|
|
|
|
(void)argv;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void test_rewrite_includes() {
|
|
|
|
__builtin_va_list argp;
|
|
|
|
vprintf("string", argp);
|
|
|
|
}
|
|
|
|
|
2019-10-11 02:36:41 +08:00
|
|
|
// CHECK-NO-MAIN-FILE-NAME: !DIFile(filename: "/UNLIKELY_PATH/empty{{/|\\\\}}<stdin>"
|
2018-12-08 01:57:44 +08:00
|
|
|
// 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.
|
2018-12-07 02:44:50 +08:00
|
|
|
// CHECK-NO-MAIN-FILE-NAME-SAME: directory: "{{()|(.*:.*)}}")
|
2018-12-08 01:57:44 +08:00
|
|
|
// CHECK-NO-MAIN-FILE-NAME: !DIFile(filename: "/UNLIKELY_PATH/empty{{[/\\]}}Inputs/stdio.h",
|
2018-12-07 02:44:50 +08:00
|
|
|
// CHECK-NO-MAIN-FILE-NAME-SAME: directory: "{{()|(.*:.*)}}")
|
2015-10-13 04:21:08 +08:00
|
|
|
// CHECK-NO-MAIN-FILE-NAME-NOT: !DIFile(filename:
|
|
|
|
|
2018-12-08 01:57:44 +08:00
|
|
|
// CHECK-EVIL: !DIFile(filename: "/UNLIKELY_PATH=empty{{[/\\]}}{{.*}}"
|
|
|
|
// CHECK-EVIL: !DIFile(filename: "/UNLIKELY_PATH=empty{{[/\\]}}{{.*}}Inputs/stdio.h",
|
2018-12-07 02:44:50 +08:00
|
|
|
// CHECK-EVIL-SAME: directory: "{{()|(.*:.*)}}")
|
2015-10-13 04:21:08 +08:00
|
|
|
// CHECK-EVIL-NOT: !DIFile(filename:
|
|
|
|
|
2018-12-08 01:57:44 +08:00
|
|
|
// CHECK: !DIFile(filename: "/UNLIKELY_PATH/empty{{[/\\]}}{{.*}}"
|
|
|
|
// CHECK: !DIFile(filename: "/UNLIKELY_PATH/empty{{[/\\]}}{{.*}}Inputs/stdio.h",
|
2018-12-07 02:44:50 +08:00
|
|
|
// CHECK-SAME: directory: "{{()|(.*:.*)}}")
|
2015-10-13 04:21:08 +08:00
|
|
|
// CHECK-NOT: !DIFile(filename:
|
|
|
|
|
2018-12-08 01:57:44 +08:00
|
|
|
// CHECK-COMPILATION-DIR: !DIFile(filename: "{{.*}}", directory: "/UNLIKELY_PATH/empty")
|
|
|
|
// CHECK-COMPILATION-DIR: !DIFile(filename: "{{.*}}Inputs/stdio.h", directory: "/UNLIKELY_PATH/empty")
|
2015-10-13 04:21:08 +08:00
|
|
|
// CHECK-COMPILATION-DIR-NOT: !DIFile(filename:
|