1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test
David Blaikie 46956547ea Reapply: DebugInfo: Assume an absence of ranges or high_pc on a CU means the CU is empty (devoid of code addresses)
Originally committed in r349333, reverted in r349353.

GCC emitted these unconditionally on/before 4.4/March 2012
Clang emitted these unconditionally on/before 3.5/March 2014

This improves performance when parsing CUs (especially those using split
DWARF) that contain no code ranges (such as the mini CUs that may be
created by ThinLTO importing - though generally they should be/are
avoided, especially for Split DWARF because it produces a lot of very
small CUs, which don't scale well in a bunch of other ways too
(including size)).

The revert was due to a (Google internal) test that had some checked in old
object files missing DW_AT_ranges. That's since been fixed.

llvm-svn: 349968
2018-12-21 22:25:01 +00:00

23 lines
835 B
Plaintext

RUN: rm -rf %t && mkdir -p %t
RUN: cd %t
RUN: cp %p/Inputs/split-dwarf-no-skel-address.dwo %t
RUN: echo "%p/Inputs/split-dwarf-no-skel-address.o 0x4" > %t.input
RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
RUN: --default-arch=i386 < %t.input | FileCheck %s
Built from the following source:
void f1();
__attribute__((always_inline)) inline void f2() { f1(); }
void f3() { f2(); }
Compiled to assembly with clang, modified the skeleton CU to remove the
high/low pc (& update the CU length field and abbrev to match) & then
compile/objcopy to make the .o and .dwo.
Ensure that the f2 inlined frame is not included - it's inefficient to have to
go and load all the debug info and search for the address ranges, so assume
that a lack of ranges on the CU means the CU covers no addresses.
CHECK-NOT: _Z2f2v