[DEBUGINFO] Add -no-dwarf-debug-ranges option.
Summary:
Added option -no-dwarf-debug-ranges option to disable emission of
.debug_ranges section.
Reviewers: probinson, echristo
Subscribers: aprantl, JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D44384
llvm-svn: 328030
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 56a1d63..4459a50 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -261,6 +261,9 @@
/// Whether to emit DWARF pub sections or not.
bool UsePubSections = true;
+ /// Allow emission of .debug_ranges section.
+ bool UseRangesSection = true;
+
/// DWARF5 Experimental Options
/// @{
bool HasDwarfAccelTables;
@@ -507,6 +510,9 @@
/// Returns whether GNU oub sections should be emitted.
bool usePubSections() const { return UsePubSections; }
+ /// Returns whether ranges section should be emitted.
+ bool useRangesSection() const { return UseRangesSection; }
+
// Experimental DWARF5 features.
/// Returns whether or not to emit tables that dwarf consumers can