mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
f435a2459a
In cases where the debugger load time is a worthwhile tradeoff (or less costly - such as loading from a DWP instead of a variety of DWOs (possibly over a high-latency/distributed filesystem)) against object file size, it can be reasonable to disable pubnames and corresponding gdb-index creation in the linker. A backend-flag version of this was implemented for NVPTX in D44385/r327994 - which was fine for NVPTX which wouldn't mix-and-match CUs. Now that it's going to be a user-facing option (likely powered by "-gno-pubnames", the same as GCC) it should be encoded in the DICompileUnit so it can vary per-CU. After this, likely the NVPTX support should be migrated to the metadata & the previous flag implementation should be removed. Reviewers: aprantl Differential Revision: https://reviews.llvm.org/D50213 llvm-svn: 339939
27 lines
1.2 KiB
LLVM
27 lines
1.2 KiB
LLVM
; RUN: llc < %s | FileCheck %s
|
|
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
!llvm.dbg.cu = !{!4, !11}
|
|
!llvm.module.flags = !{!7}
|
|
|
|
; CHECK: .section .debug_pubnames
|
|
; CHECK: .asciz "a"
|
|
|
|
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
|
!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
|
|
!2 = !DIFile(filename: "g.c", directory: "/tmp")
|
|
!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
|
|
!4 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6)
|
|
!5 = !{}
|
|
!6 = !{!0}
|
|
!7 = !{i32 1, !"Debug Info Version", i32 3}
|
|
|
|
; CHECK: .section .debug_gnu_pubnames
|
|
; CHECK: .asciz "b"
|
|
|
|
!8 = !DIGlobalVariableExpression(var: !9, expr: !DIExpression())
|
|
!9 = !DIGlobalVariable(name: "b", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
|
|
!10 = !{!8}
|
|
!11 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !10, nameTableKind: GNU)
|