[DEBUGINFO] Add flag -no-dwarf-pub-sections to disable pub sections.
Summary:
Added a flag -no-dwarf-pub-sections, which allows to disable
emission of DWARF public sections.
Reviewers: probinson, echristo
Subscribers: aprantl, JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D44385
llvm-svn: 327994
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index c8a36ba..56a1d63 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -258,6 +258,9 @@
/// Use inlined strings.
bool UseInlineStrings = false;
+ /// Whether to emit DWARF pub sections or not.
+ bool UsePubSections = true;
+
/// DWARF5 Experimental Options
/// @{
bool HasDwarfAccelTables;
@@ -501,6 +504,9 @@
/// Returns whether to use inline strings.
bool useInlineStrings() const { return UseInlineStrings; }
+ /// Returns whether GNU oub sections should be emitted.
+ bool usePubSections() const { return UsePubSections; }
+
// Experimental DWARF5 features.
/// Returns whether or not to emit tables that dwarf consumers can