summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-09-04 04:31:56 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-09-04 04:31:56 +0000
commita318370b8d62da898f4d1d80fc66f3b2f07999ba (patch)
tree503fc2d92b0fbbe7e65c71857e9ea7e7585d63b9 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parentc9f5859f81878ec0e2c03e925c2ecef5b1d93cd5 (diff)
downloadbcm5719-llvm-a318370b8d62da898f4d1d80fc66f3b2f07999ba.tar.gz
bcm5719-llvm-a318370b8d62da898f4d1d80fc66f3b2f07999ba.zip
Revert "Remove the darwin gdb option, that version of gdb is now dead and the rest of the compatibility should be done on a dwarf-N level."
This reverts commit r189903. This commit broke the phase 1 buildbot for a while. http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/6684 llvm-svn: 189913
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 3e1877dc951..ce684ffe80a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -85,6 +85,14 @@ DwarfAccelTables("dwarf-accel-tables", cl::Hidden,
cl::init(Default));
static cl::opt<DefaultOnOff>
+DarwinGDBCompat("darwin-gdb-compat", cl::Hidden,
+ cl::desc("Compatibility with Darwin gdb."),
+ cl::values(clEnumVal(Default, "Default for platform"),
+ clEnumVal(Enable, "Enabled"),
+ clEnumVal(Disable, "Disabled"), clEnumValEnd),
+ cl::init(Default));
+
+static cl::opt<DefaultOnOff>
SplitDwarf("split-dwarf", cl::Hidden,
cl::desc("Output prototype dwarf split debug info."),
cl::values(clEnumVal(Default, "Default for platform"),
@@ -198,6 +206,11 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
// and handle split dwarf.
bool IsDarwin = Triple(A->getTargetTriple()).isOSDarwin();
+ if (DarwinGDBCompat == Default)
+ IsDarwinGDBCompat = IsDarwin;
+ else
+ IsDarwinGDBCompat = DarwinGDBCompat == Enable;
+
if (DwarfAccelTables == Default)
HasDwarfAccelTables = IsDarwin;
else
@@ -1885,10 +1898,10 @@ void DwarfDebug::emitSectionLabels() {
DwarfLineSectionSym =
emitSectionSym(Asm, TLOF.getDwarfLineSection(), "section_line");
emitSectionSym(Asm, TLOF.getDwarfLocSection());
- if (HasDwarfPubSections) {
+ if (HasDwarfPubSections)
emitSectionSym(Asm, TLOF.getDwarfPubNamesSection());
+ if (useDarwinGDBCompat() || HasDwarfPubSections)
emitSectionSym(Asm, TLOF.getDwarfPubTypesSection());
- }
DwarfStrSectionSym =
emitSectionSym(Asm, TLOF.getDwarfStrSection(), "info_string");
if (useSplitDwarf()) {
OpenPOWER on IntegriCloud