From 360f0062bc83610e944123ee30eb057c325dfbf7 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 23 Aug 2012 07:10:56 +0000 Subject: [PATCH] Emit pubtypes only when going for darwin gdb compatibility. rdar://10393214 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162434 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 5 ++++- test/DebugInfo/2010-04-13-PubType.ll | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 02d86c7ad25..944c2027ee4 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -832,7 +832,10 @@ void DwarfDebug::endModule() { } // Emit info into a debug pubtypes section. - emitDebugPubTypes(); + // TODO: When we don't need the option anymore we can + // remove all of the code that adds to the table. + if (DarwinGDBCompat) + emitDebugPubTypes(); // Emit info into a debug loc section. emitDebugLoc(); diff --git a/test/DebugInfo/2010-04-13-PubType.ll b/test/DebugInfo/2010-04-13-PubType.ll index 19bfae4113a..58488e6e9a5 100644 --- a/test/DebugInfo/2010-04-13-PubType.ll +++ b/test/DebugInfo/2010-04-13-PubType.ll @@ -1,4 +1,4 @@ -; RUN: llc -O0 -asm-verbose < %s | FileCheck %s +; RUN: llc -O0 -asm-verbose -darwin-gdb-compat < %s | FileCheck %s ; CHECK-NOT: .asciz "X" ## External Name ; CHECK: .asciz "Y" ## External Name ; Test to check type with no definition is listed in pubtypes section.