1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/lib
Ali Tamur ed32e1bd63 [llvm] Reapply "Prevent duplicate files in debug line header in dwarf 5."
Reapply rL356941 after regenerating the object file in the failing test
llvm/test/tools/llvm-objdump/embedded-source.test from source.

Original commit message:

[llvm] Prevent duplicate files in debug line header in dwarf 5.

Motivation: In previous dwarf versions, file name indexes started from 1, and
the primary source file was not explicit. Dwarf 5 standard (6.2.4) prescribes
the primary source file to be explicitly given an entry with an index number 0.

The current implementation honors the specification by just duplicating the
main source file, once with index number 0, and later maybe with another
index number. While this is compliant with the letter of the standard, the
duplication causes problems for consumers of this information such as lldb.
(Some files are duplicated, where only some of them have a line table although
all refer to the same file)

With this change, dwarf 5 debug line section files always start from 0, and
the zeroth entry is not duplicated whenever possible. This requires different
handling of dwarf 4 and dwarf 5 during generation (e.g. when a function returns
an index zero for a file name, it signals an error in dwarf 4, but not in dwarf 5)
However, I think the minor complication is worth it, because it enables all
consumers (lldb, gdb, dwarfdump, objdump, and so on) to treat all files in the
file name list homogenously.

Tags: #llvm, #debug-info

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

llvm-svn: 357018
2019-03-26 18:53:23 +00:00
..
Analysis Fix the build with GCC 4.8 after r356783 2019-03-25 09:27:42 +00:00
AsmParser IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
BinaryFormat [Object] Add basic minidump support 2019-03-21 09:18:59 +00:00
Bitcode [DebugInfoMetadata] Move main subprogram DIFlag into DISPFlags 2019-03-19 13:49:03 +00:00
CodeGen [llvm] Reapply "Prevent duplicate files in debug line header in dwarf 5." 2019-03-26 18:53:23 +00:00
DebugInfo [llvm] Reapply "Prevent duplicate files in debug line header in dwarf 5." 2019-03-26 18:53:23 +00:00
Demangle
ExecutionEngine [DebugInfo] IntelJitEventListener follow up for "add SectionedAddress ..." 2019-03-25 13:50:26 +00:00
Fuzzer
FuzzMutate
IR [LLVM-C] Add binding to look up intrinsic by name 2019-03-25 20:58:58 +00:00
IRReader
LineEditor
Linker [Linker] Fix crash handling appending linkage 2019-03-20 19:20:07 +00:00
LTO
MC [llvm] Reapply "Prevent duplicate files in debug line header in dwarf 5." 2019-03-26 18:53:23 +00:00
MCA [MCA] Correctly update the UsedResourceGroups mask in the InstrBuilder. 2019-03-26 15:38:37 +00:00
Object [llvm-dlltool] Set a proper machine type for weak symbol object files 2019-03-26 09:02:44 +00:00
ObjectYAML MinidumpYAML.cpp: Fix some code standard violations missed during review 2019-03-25 14:45:31 +00:00
Option
Passes Resubmit r356511 "[TailCallElim] Add tailcall elimination pass to LTO pipelines" 2019-03-20 19:08:18 +00:00
ProfileData
Remarks [Remarks] Fix mismatched delete due to missing virtual destructor 2019-03-20 17:44:24 +00:00
Support Moved body of methods dump to .cpp file to fix compilation when modules 2019-03-26 14:25:12 +00:00
TableGen [TableGen] Let list elements have a trailing comma 2019-03-26 11:16:01 +00:00
Target [WebAssembly] Don't analyze branches after CFGStackify 2019-03-26 18:21:20 +00:00
Testing
TextAPI Followup for r356820 to fix the bots. 2019-03-22 23:10:51 +00:00
ToolDrivers
Transforms [InstCombine] form uaddsat from add+umin (PR14613) 2019-03-26 17:50:08 +00:00
WindowsManifest
XRay
CMakeLists.txt
LLVMBuild.txt