summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index a1e9a01e72b..b9a17d5018c 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -123,6 +123,11 @@ DwarfInlinedStrings("dwarf-inlined-strings", cl::Hidden,
clEnumVal(Disable, "Disabled")),
cl::init(Default));
+static cl::opt<bool>
+ NoDwarfPubSections("no-dwarf-pub-sections", cl::Hidden,
+ cl::desc("Disable emission of DWARF pub sections."),
+ cl::init(false));
+
enum LinkageNameOption {
DefaultLinkageNames,
AllLinkageNames,
@@ -310,6 +315,8 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
// Use dwarf 4 by default if nothing is requested.
DwarfVersion = DwarfVersion ? DwarfVersion : dwarf::DWARF_VERSION;
+ UsePubSections = !NoDwarfPubSections;
+
// Work around a GDB bug. GDB doesn't support the standard opcode;
// SCE doesn't support GNU's; LLDB prefers the standard opcode, which
// is defined as of DWARF 3.
OpenPOWER on IntegriCloud