llvm-capstone/clang/test/CodeGen/debug-info-ranges-base-address.c
David Blaikie 27692de9cf 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

llvm-svn: 346789
2018-11-13 20:08:13 +00:00

10 lines
340 B
C

// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck --check-prefix=NORNGBSE %s
// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - -fdebug-ranges-base-address | FileCheck --check-prefix=RNGBSE %s
// NORNGBSE-NOT: rangesBaseAddress
// RNGBSE: !DICompileUnit({{.*}}, rangesBaseAddress: true
void f1() {
}