diff options
author | Azat Khuzhin <a3at.mail@gmail.com> | 2022-09-13 22:32:55 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2022-09-13 22:33:56 +0000 |
commit | 6bf6730ac55e064edf46915ebba02e9c716f48e8 (patch) | |
tree | 5b980ed136e562d0aee98c0f5566e7f783e6c2e1 /llvm/lib/CodeGen/MachineOperand.cpp | |
parent | 13f1bc41888e7d6555c532ba5fa925b9fe3e6b2f (diff) | |
download | llvm-6bf6730ac55e064edf46915ebba02e9c716f48e8.zip llvm-6bf6730ac55e064edf46915ebba02e9c716f48e8.tar.gz llvm-6bf6730ac55e064edf46915ebba02e9c716f48e8.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 -mllvm -generate-arange-section.
P.S. although this looks like a hack, since none of -mllvm was passed to
the lld before.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Suggested-by: OCHyams <orlando.hyams@sony.com>
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D133092
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions