DebugInfo: Shrink pubnames/pubtypes in the presence of type units by only emitting pub sections for compile units

llvm-svn: 203057
diff --git a/llvm/test/DebugInfo/X86/generate-odr-hash.ll b/llvm/test/DebugInfo/X86/generate-odr-hash.ll
index f166bdf..64a428e 100644
--- a/llvm/test/DebugInfo/X86/generate-odr-hash.ll
+++ b/llvm/test/DebugInfo/X86/generate-odr-hash.ll
@@ -53,20 +53,25 @@
 ; FISSION-LABEL: .debug_info.dwo contents:
 ; CHECK: Compile Unit: length = [[CU_SIZE:[0-9a-f]+]]
 
-; CHECK: DW_TAG_structure_type
+; CHECK: [[BAR:^0x........]]: DW_TAG_structure_type
 ; CHECK-NEXT: DW_AT_declaration
-; CHECK-NEXT: DW_AT_signature
-; CHECK: DW_TAG_class_type
+; CHECK-NEXT: DW_AT_signature {{.*}} (0x1d02f3be30cc5688)
+; CHECK: [[FLUFFY:^0x........]]: DW_TAG_class_type
 ; CHECK-NEXT: DW_AT_declaration
-; CHECK-NEXT: DW_AT_signature
+; CHECK-NEXT: DW_AT_signature {{.*}} (0xb04af47397402e77)
 
 ; Ensure the CU-local type 'walrus' is not placed in a type unit.
-; CHECK: DW_TAG_structure_type
+; CHECK: [[WALRUS:^0x........]]: DW_TAG_structure_type
 ; CHECK-NEXT: DW_AT_name{{.*}}"walrus"
 ; CHECK-NEXT: DW_AT_byte_size
 ; CHECK-NEXT: DW_AT_decl_file
 ; CHECK-NEXT: DW_AT_decl_line
 
+
+; CHECK: [[WOMBAT:^0x........]]: DW_TAG_structure_type
+; CHECK-NEXT: DW_AT_declaration
+; CHECK-NEXT: DW_AT_signature {{.*}} (0xfd756cee88f8a118)
+
 ; FISSION-LABEL: .debug_types contents:
 ; FISSION-NOT: type_signature
 ; FISSION-LABEL: type_signature = 0x1d02f3be30cc5688
@@ -142,25 +147,10 @@
 ; Don't emit pubtype entries for type DIEs in the compile unit that just indirect to a type unit.
 ; CHECK-NEXT: unit_size = [[CU_SIZE]]
 ; CHECK-NEXT: Offset Name
-; CHECK-NEXT: "walrus"
-; Type unit for 'bar'
-; SINGLE-NEXT: unit_size = 0x00000027
-; FISSION-NEXT: unit_size = 0x00000028
-; CHECK-NEXT: Offset Name
-; CHECK-NEXT: "bar"
-; SINGLE-NEXT: unit_size = 0x00000061
-; FISSION-NEXT: unit_size = 0x00000028
-; CHECK-NEXT: Offset Name
-; CHECK-NEXT: "int"
-; CHECK-NEXT: "echidna::capybara::mongoose::fluffy"
-; SINGLE-NEXT: unit_size = 0x0000003e
-; FISSION-NEXT: unit_size = 0x00000028
-; CHECK-NEXT: Offset Name
-; CHECK-NEXT: "wombat"
-; SINGLE-NEXT: unit_size = 0x0000004f
-; FISSION-NEXT: unit_size = 0x00000028
-; CHECK-NEXT: Offset Name
-; CHECK-NEXT: "int"
+; CHECK-NEXT: [[BAR]] "bar"
+; CHECK-NEXT: [[WOMBAT]] "wombat"
+; CHECK-NEXT: [[FLUFFY]] "echidna::capybara::mongoose::fluffy"
+; CHECK-NEXT: [[WALRUS]] "walrus"
 
 %struct.bar = type { i8 }
 %"class.echidna::capybara::mongoose::fluffy" = type { i32, i32 }