diff options
| author | Victor Leschuk <vleschuk@accesssoftek.com> | 2016-10-31 19:09:38 +0000 |
|---|---|---|
| committer | Victor Leschuk <vleschuk@accesssoftek.com> | 2016-10-31 19:09:38 +0000 |
| commit | e1156c2eb05f12bb1dcbdd03532ed8098d415695 (patch) | |
| tree | 99ed65395bdc93c2c4fc08732aa60e3c08ba3921 /llvm/test/DebugInfo | |
| parent | e5b62c83be3f35f994d1e4510dcb23c1a4133d97 (diff) | |
| download | bcm5719-llvm-e1156c2eb05f12bb1dcbdd03532ed8098d415695.tar.gz bcm5719-llvm-e1156c2eb05f12bb1dcbdd03532ed8098d415695.zip | |
DebugInfo: make DW_TAG_atomic_type valid
DW_TAG_atomic_type was already included in Dwarf.defs and emitted correctly,
however Verifier didn't recognize it as valid.
Thus we introduce the following changes:
* Make DW_TAG_atomic_type valid tag for IR and DWARF (enabled only with -gdwarf-5)
* Add it to related docs
* Add DebugInfo tests
Differential Revision: https://reviews.llvm.org/D26144
llvm-svn: 285624
Diffstat (limited to 'llvm/test/DebugInfo')
| -rw-r--r-- | llvm/test/DebugInfo/X86/atomic-c11-dwarf-4.ll | 36 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/atomic-c11-dwarf-5.ll | 37 |
2 files changed, 73 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/X86/atomic-c11-dwarf-4.ll b/llvm/test/DebugInfo/X86/atomic-c11-dwarf-4.ll new file mode 100644 index 00000000000..f55e1b20c33 --- /dev/null +++ b/llvm/test/DebugInfo/X86/atomic-c11-dwarf-4.ll @@ -0,0 +1,36 @@ +; RUN: %llc_dwarf -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s +; REQUIRES: object-emission + +; Generated by clang -c -g -std=c11 -S -emit-llvm from the following C11 source +; +; _Atomic const int i; +; + +; CHECK: DW_TAG_variable +; CHECK: DW_TAG_const_type +; CHECK-NOT: DW_TAG_atomic_type +; CHECK: DW_TAG_base_type + +; ModuleID = 'atomic.c' +source_filename = "atomic.c" +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +@i = common global i32 0, align 4, !dbg !0 + +!llvm.dbg.cu = !{!1} +!llvm.module.flags = !{!9, !10} +!llvm.ident = !{!11} + +!0 = distinct !DIGlobalVariable(name: "i", scope: !1, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git cd238117e3a8a57271a82d0bb03d6df6ad8f073e) (http://llvm.org/git/llvm.git 9fd063832c1541aad3907cd60ac344d36997905f)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4) +!2 = !DIFile(filename: "atomic.c", directory: "/tmp") +!3 = !{} +!4 = !{!0} +!5 = !DIFile(filename: "atomic.c", directory: "/tmp") +!6 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !7) +!7 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !8) +!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!9 = !{i32 2, !"Dwarf Version", i32 4} +!10 = !{i32 2, !"Debug Info Version", i32 3} +!11 = !{!"clang version 4.0.0 (http://llvm.org/git/clang.git cd238117e3a8a57271a82d0bb03d6df6ad8f073e) (http://llvm.org/git/llvm.git 9fd063832c1541aad3907cd60ac344d36997905f)"} diff --git a/llvm/test/DebugInfo/X86/atomic-c11-dwarf-5.ll b/llvm/test/DebugInfo/X86/atomic-c11-dwarf-5.ll new file mode 100644 index 00000000000..d450a3bb13f --- /dev/null +++ b/llvm/test/DebugInfo/X86/atomic-c11-dwarf-5.ll @@ -0,0 +1,37 @@ +; RUN: %llc_dwarf -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s +; REQUIRES: object-emission + +; Generated by clang -c -g -std=c11 -S -emit-llvm from the following C11 source +; +; _Atomic const int i; +; + +; CHECK: DW_TAG_variable +; CHECK: DW_TAG_const_type +; CHECK: DW_TAG_atomic_type +; CHECK-NOT: NULL +; CHECK: DW_TAG_base_type + +; ModuleID = 'atomic.c' +source_filename = "atomic.c" +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +@i = common global i32 0, align 4, !dbg !0 + +!llvm.dbg.cu = !{!1} +!llvm.module.flags = !{!9, !10} +!llvm.ident = !{!11} + +!0 = distinct !DIGlobalVariable(name: "i", scope: !1, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git cd238117e3a8a57271a82d0bb03d6df6ad8f073e) (http://llvm.org/git/llvm.git 9fd063832c1541aad3907cd60ac344d36997905f)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4) +!2 = !DIFile(filename: "atomic.c", directory: "/tmp") +!3 = !{} +!4 = !{!0} +!5 = !DIFile(filename: "atomic.c", directory: "/tmp") +!6 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !7) +!7 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !8) +!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!9 = !{i32 2, !"Dwarf Version", i32 5} +!10 = !{i32 2, !"Debug Info Version", i32 3} +!11 = !{!"clang version 4.0.0 (http://llvm.org/git/clang.git cd238117e3a8a57271a82d0bb03d6df6ad8f073e) (http://llvm.org/git/llvm.git 9fd063832c1541aad3907cd60ac344d36997905f)"} |

