Don't bother emitting the pubtypes section on darwin since there aren't
authorEric Christopher <echristo@gmail.com>
Fri, 30 Aug 2013 00:40:17 +0000 (00:40 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 30 Aug 2013 00:40:17 +0000 (00:40 +0000)
any maintained consumers of it on that platform.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189631 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp
test/DebugInfo/X86/2010-04-13-PubType.ll

index 86f17862718c1acdd8360c9882de7510f3188afc..b1a75fba6cac99e830f4e38a0093d4c163595d91 100644 (file)
@@ -1111,15 +1111,11 @@ void DwarfDebug::endModule() {
     emitAccelTypes();
   }
 
-  // Emit info into a debug pubnames section, if requested.
-  if (HasDwarfPubSections)
+  // Emit the pubnames and pubtypes sections if requested.
+  if (HasDwarfPubSections) {
     emitDebugPubnames();
-
-  // Emit info into a debug pubtypes section.
-  // TODO: When we don't need the option anymore we can
-  // remove all of the code that adds to the table.
-  if (useDarwinGDBCompat() || HasDwarfPubSections)
     emitDebugPubTypes();
+  }
 
   // Finally emit string information into a string table.
   emitDebugStr();
index 3166f2d562d5e310a3e44a313845e13df82b3f72..dc0338fdf32003ccc4cccf4f99e1f629573e31c5 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -O0 -asm-verbose -mtriple=x86_64-macosx < %s | FileCheck %s
+; RUN: llc -O0 -asm-verbose -mtriple=x86_64-macosx -generate-dwarf-pub-sections=Enable < %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.