1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/unittests
Pavel Labath a535687c39 dwarfgen: Add support for generating the debug_str_offsets section, take 2
This recommits r337910 after fixing an "ambiguous call to addAttribute"
error with some compilers (gcc circa 4.9 and MSVC). It seems that these
compilers will consider a "false -> pointer" conversion during overload
resolution. This creates ambiguity because one I added an overload which
takes a MCExpr * as an argument.

I fix this by making the new overload take MCExpr&, which avoids the
conversion. It also documents the fact that we expect a valid MCExpr
object.

Original commit message follows:

The motivation for this is D49493, where we'd like to test details of
debug_str_offsets behavior which is difficult to trigger from a
traditional test.

This adds the plubming necessary for dwarfgen to generate this section.
The more interesting changes are:
- I've moved emitStringOffsetsTableHeader function from DwarfFile to
  DwarfStringPool, so I can generate the section header more easily from
  the unit test.
- added a new addAttribute overload taking an MCExpr*. This is used to
  generate the DW_AT_str_offsets_base, which links a compile unit to the
  offset table.

I've also added a basic test for reading and writing DW_form_strx forms.

Reviewers: dblaikie, JDevlieghere, probinson

Subscribers: llvm-commits, aprantl

Differential Revision: https://reviews.llvm.org/D49670

llvm-svn: 337933
2018-07-25 15:33:32 +00:00
..
ADT Recommit r334887: [SmallSet] Add SmallSetIterator. 2018-07-24 10:32:54 +00:00
Analysis llvm: Add support for "-fno-delete-null-pointer-checks" 2018-07-09 22:27:23 +00:00
AsmParser Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
BinaryFormat Re-land: [MachO] Fixing ub in MachO BinaryFormat 2018-06-03 20:33:42 +00:00
Bitcode Pass a reference to a module to the bitcode writer. 2018-02-14 19:11:32 +00:00
CodeGen [GISel]: Pattern matchers for GFSUB, GFNEG 2018-05-31 19:30:01 +00:00
DebugInfo dwarfgen: Add support for generating the debug_str_offsets section, take 2 2018-07-25 15:33:32 +00:00
Demangle [demangler] Add ItaniumPartialDemangler::isCtorOrDtor 2018-05-24 06:57:57 +00:00
ExecutionEngine [ORC] Re-apply r336760 with fixes. 2018-07-21 00:12:05 +00:00
FuzzMutate [FuzzMutate] Inst deleter doesn't work with PhiNodes 2018-01-25 09:22:18 +00:00
IR [DomTreeUpdater] Ignore updates when both DT and PDT are nullptrs 2018-07-13 04:02:13 +00:00
LineEditor Remove autoconf support 2016-01-26 21:29:08 +00:00
Linker Inline a few CMake variables into their only uses. 2018-05-14 19:23:31 +00:00
MC [WebAssembly] Remove ELF file support. 2018-07-16 23:09:29 +00:00
MI [LiveIntervals] Handle moving up dead partial write 2018-02-26 14:42:13 +00:00
Object Fix unittest for buildbot with mips host (32bit big endian) from r295174 2017-02-15 16:03:22 +00:00
ObjectYAML Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
Option Re-revert "[Option] Fix PR37006 prefix choice in findNearest" 2018-05-19 16:21:01 +00:00
Passes Fix build warning compiling TestPlugin on Windows and disable Passes plugin stuff on Windows since it fundamentally can't work 2018-05-19 03:05:30 +00:00
ProfileData [NFC] Change sample profile format enum name SPF_Raw_Binary to SPF_Binary. 2018-06-12 05:53:49 +00:00
Support [DebugCounters] Keep track of total counts 2018-07-23 21:49:36 +00:00
Target [WebAssembly] Add WebAssemblyException information analysis 2018-06-25 01:20:21 +00:00
tools [cfi-verify] Support AArch64. 2018-07-13 15:19:33 +00:00
Transforms Recommit r336653: [VPlan] Add VPlanTestBase.h with helper 2018-07-11 11:54:30 +00:00
XRay Inline a few CMake variables into their only uses. 2018-05-14 19:23:31 +00:00
CMakeLists.txt alphabetize list 2018-05-14 18:23:05 +00:00