Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / debug-info-abspath.c
blobb2047a7deb0e03d41a2a2d2db8837cdd3b9ec6b6
1 // RUN: mkdir -p %t/UNIQUEISH_SENTINEL
2 // RUN: cp %s %t/UNIQUEISH_SENTINEL/debug-info-abspath.c
4 // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
5 // RUN: %t/UNIQUEISH_SENTINEL/debug-info-abspath.c -emit-llvm -o - \
6 // RUN: | FileCheck %s
8 // RUN: cp %s %t.c
9 // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
10 // RUN: %t.c -emit-llvm -o - | FileCheck %s --check-prefix=INTREE
12 // RUN: cd %t/UNIQUEISH_SENTINEL
13 // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
14 // RUN: debug-info-abspath.c -emit-llvm -o - \
15 // RUN: | FileCheck %s --check-prefix=CURDIR
16 // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
17 // RUN: %s -emit-llvm -o - | FileCheck %s --check-prefix=CURDIR
19 void foo(void) {}
21 // Since %s is an absolute path, directory should be the common
22 // prefix, but the directory part should be part of the filename.
24 // CHECK: = distinct !DISubprogram({{.*}}file: ![[SPFILE:[0-9]+]]
25 // CHECK: ![[SPFILE]] = !DIFile(filename: "{{.*}}UNIQUEISH_SENTINEL
26 // CHECK-SAME: debug-info-abspath.c"
27 // CHECK-NOT: directory: "{{.*}}UNIQUEISH_SENTINEL
29 // INTREE: = distinct !DISubprogram({{.*}}![[SPFILE:[0-9]+]]
30 // INTREE: DIFile({{.*}}directory: "{{.+}}CodeGen{{.*}}")
32 // CURDIR: = distinct !DICompileUnit({{.*}}file: ![[CUFILE:[0-9]+]]
33 // CURDIR: ![[CUFILE]] = !DIFile({{.*}}directory: "{{.+}}UNIQUEISH_SENTINEL")