forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DWARF debug info support for C++11 inline namespaces.
This implements the DWARF 5 DW_AT_export_symbols feature: http://dwarfstd.org/ShowIssue.php?issue=141212.1 <rdar://problem/18616046> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285959 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
2d1f4f5
commit 60a7c43
Showing
16 changed files
with
135 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
; RUN: llvm-dis %s.bc -o - | FileCheck %s | ||
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | ||
target triple = "x86_64-apple-macosx10.12.0" | ||
|
||
@_ZN1N1iE = global i32 0, align 4, !dbg !0 | ||
|
||
!llvm.dbg.cu = !{!4} | ||
!llvm.module.flags = !{!7, !8, !9} | ||
!llvm.ident = !{!10} | ||
|
||
!0 = distinct !DIGlobalVariable(name: "i", linkageName: "_ZN1N1iE", scope: !1, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true) | ||
; Test bitcode upgrade for DINamespace without an exportSymbols field. | ||
; CHECK: !DINamespace(name: "N", scope: null, file: !{{[0-9]+}}, line: 1) | ||
!1 = !DINamespace(name: "N", scope: null, file: !2, line: 1) | ||
!2 = !DIFile(filename: "dinamespace.cpp", directory: "/") | ||
!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) | ||
!4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 4.0.0 (trunk 283228) (llvm/trunk 283225)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, globals: !6) | ||
!5 = !{} | ||
!6 = !{!0} | ||
!7 = !{i32 2, !"Dwarf Version", i32 4} | ||
!8 = !{i32 2, !"Debug Info Version", i32 3} | ||
!9 = !{i32 1, !"PIC Level", i32 2} | ||
!10 = !{!"clang version 4.0.0 (trunk 283228) (llvm/trunk 283225)"} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
; RUN: %llc_dwarf %s -o - -filetype=obj | llvm-dwarfdump -debug-dump=info - | FileCheck %s | ||
; Generated from: | ||
; namespace normal { inline namespace inlined { int i; } } | ||
; Check that an inline namespace is emitted with DW_AT_export_symbols | ||
|
||
; CHECK: DW_TAG_namespace | ||
; CHECK-NEXT: DW_AT_name {{.*}} "normal" | ||
; CHECK-NOT: DW_AT_export_symbols | ||
; CHECK-NOT: NULL | ||
; CHECK: DW_TAG_namespace | ||
; CHECK-NEXT: DW_AT_name {{.*}} "inlined" | ||
; CHECK-NOT: DW_TAG | ||
; CHECK-NOT: NULL | ||
; CHECK: DW_AT_export_symbols [DW_FORM_flag_present] (true) | ||
; CHECK-NOT: DW_TAG | ||
; CHECK: DW_TAG_variable | ||
; CHECK-NEXT: DW_AT_name {{.*}} "i" | ||
|
||
source_filename = "namespace.cpp" | ||
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | ||
target triple = "x86_64-apple-macosx10.12.0" | ||
|
||
@_ZN6normal7inlined1iE = global i32 0, align 4, !dbg !0 | ||
|
||
!llvm.dbg.cu = !{!5} | ||
!llvm.module.flags = !{!8, !9, !10} | ||
!llvm.ident = !{!11} | ||
|
||
!0 = distinct !DIGlobalVariable(name: "i", linkageName: "_ZN6normal7inlined1iE", scope: !1, file: !2, line: 1, type: !4, isLocal: false, isDefinition: true) | ||
!1 = !DINamespace(name: "inlined", scope: !3, file: !2, line: 1, exportSymbols: true) | ||
!2 = !DIFile(filename: "namespace.cpp", directory: "/") | ||
!3 = !DINamespace(name: "normal", scope: null, file: !2, line: 1) | ||
!4 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) | ||
!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 4.0.0 (trunk 285825) (llvm/trunk 285822)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !6, globals: !7) | ||
!6 = !{} | ||
!7 = !{!0} | ||
!8 = !{i32 2, !"Dwarf Version", i32 5} | ||
!9 = !{i32 2, !"Debug Info Version", i32 3} | ||
!10 = !{i32 1, !"PIC Level", i32 2} | ||
!11 = !{!"clang version 4.0.0 (trunk 285825) (llvm/trunk 285822)"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters