1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/tools
Simonas Kazlauskas 3635306b39 [llvm-dwp] Join dwo paths correctly when DWOPath is absolute
When the `DWOPath` is absolute, we want to use `DWOPath` as is, without prepending any other
components to the path. The `sys::path::append` does not join, but rather unconditionally appends
the paths, so something like `sys::path::append("/tmp", "/tmp/banana")` will result in
`/tmp/tmp/banana` rather than the desired `/tmp/banana`.

This then causes `llvm-dwp` to fail in a following situation:

```
$ clang -gsplit-dwarf /tmp/banana/test.c -c -o /tmp/outdir/foo.o
$ clang outdir/foo.o -o outdir/hm
$ llvm-dwarfdump outdir/hm | grep -C2 foo.dwo
                  DW_AT_comp_dir    ("/tmp")
                  DW_AT_GNU_pubnames  (true)
                  DW_AT_GNU_dwo_name    ("/tmp/outdir/foo.dwo")
                                DW_AT_GNU_dwo_id    (0xde4d396f3bf0e257)
                  DW_AT_low_pc  (0x0000000000401100)
$ strace -o trace llvm-dwp -e outdir/hm -o outdir/hm.dwp
error: No such file or directory
$ cat trace | grep foo.dwo
openat(AT_FDCWD, "/tmp/tmp/outdir/foo.dwo", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
```

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D96678
2021-02-16 13:38:35 -08:00
..
bugpoint
bugpoint-passes
dsymutil
gold
llc
lli
llvm-ar
llvm-as
llvm-as-fuzzer
llvm-bcanalyzer
llvm-c-test LLVM-C: Allow LLVM{Get/Set}Alignment on an atomicrmw/cmpxchg instruction. 2021-02-12 18:31:18 -05:00
llvm-cat
llvm-cfi-verify
llvm-config
llvm-cov
llvm-cvtres
llvm-cxxdump
llvm-cxxfilt
llvm-cxxmap
llvm-diff
llvm-dis
llvm-dwarfdump
llvm-dwp [llvm-dwp] Join dwo paths correctly when DWOPath is absolute 2021-02-16 13:38:35 -08:00
llvm-elfabi
llvm-exegesis
llvm-extract
llvm-go
llvm-gsymutil
llvm-ifs
llvm-isel-fuzzer
llvm-itanium-demangle-fuzzer
llvm-jitlink
llvm-jitlistener
llvm-libtool-darwin
llvm-link
llvm-lipo
llvm-lto Recommit "[LTO] Use lto::backend for code generation." 2021-02-15 10:05:42 +00:00
llvm-lto2
llvm-mc
llvm-mc-assemble-fuzzer
llvm-mc-disassemble-fuzzer
llvm-mca
llvm-microsoft-demangle-fuzzer
llvm-ml
llvm-modextract
llvm-mt
llvm-nm [llvm-nm] Tidy up error messages 2021-02-15 13:54:08 +00:00
llvm-objcopy [llvm-objcopy] Delete --build-id-link-{dir,input,output} 2021-02-15 11:17:32 -08:00
llvm-objdump
llvm-opt-fuzzer
llvm-opt-report
llvm-pdbutil
llvm-profdata
llvm-profgen [CSSPGO][llvm-profgen] Filter out the instructions without location info for symbolizer 2021-02-12 16:47:49 -08:00
llvm-rc
llvm-readobj
llvm-reduce
llvm-rtdyld
llvm-shlib
llvm-size
llvm-special-case-list-fuzzer
llvm-split
llvm-stress
llvm-strings
llvm-symbolizer
llvm-undname
llvm-xray [llvm] Use llvm::is_contained (NFC) 2021-02-14 08:36:20 -08:00
llvm-yaml-numeric-parser-fuzzer [llvm] NFC: Cleanup llvm-yaml-numeric-parser-fuzzer 2021-02-15 14:52:53 +01:00
llvm-yaml-parser-fuzzer
lto
msbuild
obj2yaml
opt [NewPM] Introduce (GPU)DivergenceAnalysis in the new pass manager 2021-02-16 10:26:45 +05:30
opt-viewer
remarks-shlib
sancov
sanstats
split-file
verify-uselistorder
vfabi-demangle-fuzzer
xcode-toolchain
yaml2obj
CMakeLists.txt