[all-commits] [llvm/llvm-project] f8af06: Fix -Wnon-virtual-dtor by making the ctor protected
Simonas Kazlauskas via All-commits
all-commits at lists.llvm.org
Tue Feb 16 13:38:57 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f8af06d60d9c5bcf6104bf6540350fb0fb1d7ac5
https://github.com/llvm/llvm-project/commit/f8af06d60d9c5bcf6104bf6540350fb0fb1d7ac5
Author: David Blaikie <dblaikie at gmail.com>
Date: 2021-02-16 (Tue, 16 Feb 2021)
Changed paths:
M llvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h
Log Message:
-----------
Fix -Wnon-virtual-dtor by making the ctor protected
Commit: 6ffcb2937c96bd0d7a55b984b5eb8f381b68e322
https://github.com/llvm/llvm-project/commit/6ffcb2937c96bd0d7a55b984b5eb8f381b68e322
Author: Simonas Kazlauskas <git at kazlauskas.me>
Date: 2021-02-16 (Tue, 16 Feb 2021)
Changed paths:
A llvm/test/tools/llvm-dwp/X86/absolute_paths.test
M llvm/tools/llvm-dwp/llvm-dwp.cpp
Log Message:
-----------
[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
Compare: https://github.com/llvm/llvm-project/compare/2518cc65d2a7...6ffcb2937c96
More information about the All-commits
mailing list