]> granicus.if.org Git - clang/commit
DebugInfo: Add a driver flag for DWARF debug_ranges base address specifier use.
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 13 Nov 2018 20:08:13 +0000 (20:08 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 13 Nov 2018 20:08:13 +0000 (20:08 +0000)
commitd2eb1838189c00886b73a533c7fe768b34195211
tree7ae9c471cbf4a740a8db74b92e3d3fe836ad2d82
parent32e393f332fcadb404e469cd9567d0dcfa5bba48
DebugInfo: Add a driver flag for DWARF debug_ranges base address specifier use.

Summary:
This saves a lot of relocations in optimized object files (at the cost
of some cost/increase in linked executable bytes), but gold's 32 bit
gdb-index support has a bug (
https://sourceware.org/bugzilla/show_bug.cgi?id=21894 ) so we can't
switch to this unconditionally. (& even if it weren't for that bug, one
might argue that some users would want to optimize in one direction or
the other - prioritizing object size or linked executable size)

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346789 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/CGDebugInfo.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/debug-info-ranges-base-address.c [new file with mode: 0644]
test/Driver/debug-options.c