diff options
author | Azat Khuzhin <a3at.mail@gmail.com> | 2022-10-04 19:55:19 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2022-10-04 20:03:36 +0000 |
commit | 16512898956857b13e566165ba9a195be81d325f (patch) | |
tree | 2c65a7d7c7ea8b10dac5caec7f00d221c7c9fc5a /llvm/lib/Transforms/Utils/LoopVersioning.cpp | |
parent | 2dbfd06f2a8ba6cd7cc3f587808f1ea2c61ad2c7 (diff) | |
download | llvm-16512898956857b13e566165ba9a195be81d325f.zip llvm-16512898956857b13e566165ba9a195be81d325f.tar.gz llvm-16512898956857b13e566165ba9a195be81d325f.tar.bz2 |
[clang] fix generation of .debug_aranges with LTO
Right now in case of LTO the section is not emited:
$ cat test.c
void __attribute__((optnone)) bar()
{
}
void __attribute__((optnone)) foo()
{
bar();
}
int main()
{
foo();
}
$ clang -flto=thin -gdwarf-aranges -g -O3 test.c
$ eu-readelf -waranges a.out | fgrep -c -e foo -e bar
0
$ clang -gdwarf-aranges -g -O3 test.c
$ eu-readelf -waranges a.out | fgrep -c -e foo -e bar
2
Fix this by passing explicitly --plugin-opt=-generate-arange-section.
Suggested-by: OCHyams <orlando.hyams@sony.com>
Reviewed By: dblaikie, MaskRay
Differential Revision: https://reviews.llvm.org/D133092
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopVersioning.cpp')
0 files changed, 0 insertions, 0 deletions