1 // RUN: mkdir -p %t/UNIQUEISH_SENTINEL 2 // RUN: cp %s %t/UNIQUEISH_SENTINEL/debug-info-abspath.c 3 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 7 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 11 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 18 19 void foo(void) {} 20 21 // Since %s is an absolute path, directory should be the common 22 // prefix, but the directory part should be part of the filename. 23 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 28 29 // INTREE: = distinct !DISubprogram({{.*}}![[SPFILE:[0-9]+]] 30 // INTREE: DIFile({{.*}}directory: "{{.+}}CodeGen{{.*}}") 31 32 // CURDIR: = distinct !DICompileUnit({{.*}}file: ![[CUFILE:[0-9]+]] 33 // CURDIR: ![[CUFILE]] = !DIFile({{.*}}directory: "{{.+}}UNIQUEISH_SENTINEL") 34 35