From f1b1f7fd73c5ab19b6f27c8c2c272539e913c075 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 15 May 2014 23:18:15 +0000 Subject: DebugInfo: Don't put fission type units in comdat sections. Since type units in the dwo file are handled by a debug aware tool, they don't need to leverage the ELF comdat grouping to implement deduplication. Avoid creating all the .group sections for these as a space optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208930 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/DebugInfo/X86/generate-odr-hash.ll | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'test/DebugInfo/X86/generate-odr-hash.ll') diff --git a/test/DebugInfo/X86/generate-odr-hash.ll b/test/DebugInfo/X86/generate-odr-hash.ll index e713f14c4f..7f4c99de2f 100644 --- a/test/DebugInfo/X86/generate-odr-hash.ll +++ b/test/DebugInfo/X86/generate-odr-hash.ll @@ -1,10 +1,12 @@ ; REQUIRES: object-emission -; RUN: llc %s -o %t -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu +; RUN: llc < %s -o %t -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu ; RUN: llvm-dwarfdump %t | FileCheck --check-prefix=CHECK --check-prefix=SINGLE %s +; RUN: llvm-readobj -s -t %t | FileCheck --check-prefix=OBJ_COMMON %s -; RUN: llc %s -split-dwarf=Enable -o %t -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu +; RUN: llc < %s -split-dwarf=Enable -o %t -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu ; RUN: llvm-dwarfdump %t | FileCheck --check-prefix=CHECK --check-prefix=FISSION %s +; RUN: llvm-readobj -s -t %t | FileCheck --check-prefix=OBJ_COMMON --check-prefix=OBJ_FISSION %s ; Generated from bar.cpp: @@ -161,6 +163,20 @@ ; CHECK-NEXT: [[FLUFFY]] "echidna::capybara::mongoose::fluffy" ; CHECK-NEXT: [[WALRUS]] "walrus" +; Make sure debug_types are in comdat groups. This could be more rigid to check +; that they're the right comdat groups (each type in a separate comdat group, +; etc) +; OBJ_COMMON: Name: .debug_types ( +; OBJ_COMMON-NOT: } +; OBJ_COMMON: SHF_GROUP + +; Fission type units don't go in comdat groups, since their linker is debug +; aware it's handled using the debug info semantics rather than raw ELF object +; semantics. +; OBJ_FISSION: Name: .debug_types.dwo ( +; OBJ_FISSION-NOT: SHF_GROUP +; OBJ_FISSION: } + %struct.bar = type { i8 } %"class.echidna::capybara::mongoose::fluffy" = type { i32, i32 } %"struct.::walrus" = type { i8 } -- cgit v1.2.3