xref: /aosp_15_r20/external/llvm/test/MC/ELF/comp-dir.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker// REQUIRES: shell
2*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -triple=x86_64-linux-unknown -g -fdebug-compilation-dir=/test/comp/dir %s -filetype=obj -o %t.o
3*9880d681SAndroid Build Coastguard Worker// RUN: llvm-dwarfdump -debug-dump=info %t.o | FileCheck %s
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker// CHECK: DW_AT_comp_dir [DW_FORM_string] ("{{([A-Za-z]:.*)?}}/test/comp/dir")
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker// RUN: mkdir -p %t.foo
8*9880d681SAndroid Build Coastguard Worker// RUN: ln -sf %t.foo %t.bar
9*9880d681SAndroid Build Coastguard Worker// RUN: cd %t.foo
10*9880d681SAndroid Build Coastguard Worker// RUN: env PWD=%t.bar llvm-mc -triple=x86_64-linux-unknown -g %s -filetype=obj -o %t.o
11*9880d681SAndroid Build Coastguard Worker// RUN: llvm-dwarfdump -debug-dump=info %t.o | FileCheck --check-prefix=PWD %s
12*9880d681SAndroid Build Coastguard Worker// PWD: DW_AT_comp_dir [DW_FORM_string] ("{{.*}}.bar")
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Workerf:
16*9880d681SAndroid Build Coastguard Worker  nop
17