Debian Codegraph @

clang/test/DebugInfo/Generic/abspath.c

raw
1 // RUN: mkdir -p %t/UNIQUEISH_SENTINEL
2 // RUN: cp %s %t/UNIQUEISH_SENTINEL/abspath.c
3
4 // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
5 // RUN: -fdebug-compilation-dir=%t/UNIQUEISH_SENTINEL/abspath.c \
6 // RUN: %t/UNIQUEISH_SENTINEL/abspath.c -emit-llvm -o - \
7 // RUN: | FileCheck %s
8
9 // RUN: cp %s %t.c
10 // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
11 // RUN: -fdebug-compilation-dir=%t \
12 // RUN: %t.c -emit-llvm -o - | FileCheck %s --check-prefix=INTREE
13
14 void foo(void) {}
15
16 // Since %s is an absolute path, directory should be the common
17 // prefix, but the directory part should be part of the filename.
18
19 // CHECK: = distinct !DISubprogram({{.*}}file: ![[SPFILE:[0-9]+]]
20 // CHECK: ![[SPFILE]] = !DIFile(filename: "{{.*}}UNIQUEISH_SENTINEL
21 // CHECK-SAME: abspath.c"
22 // CHECK-NOT: directory: "{{.*}}UNIQUEISH_SENTINEL
23
24 // INTREE: = distinct !DISubprogram({{.*}}![[SPFILE:[0-9]+]]
25 // INTREE: DIFile({{.*}}directory: "{{.+}}Generic{{.*}}")