From fab3e599b0a6a22b3f9efee3aa5121f17239f8b6 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 2 Dec 2013 18:44:29 +0000 Subject: DebugInfo: Type Units: Propagate the correct DW_AT_language into type units. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196130 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/DebugInfo/X86/c-type-units.ll | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 test/DebugInfo/X86/c-type-units.ll (limited to 'test/DebugInfo') diff --git a/test/DebugInfo/X86/c-type-units.ll b/test/DebugInfo/X86/c-type-units.ll new file mode 100644 index 0000000000..7fbbf7a3f0 --- /dev/null +++ b/test/DebugInfo/X86/c-type-units.ll @@ -0,0 +1,28 @@ +; REQUIRES: object-emission + +; RUN: llc -o - %s -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu | llvm-dwarfdump -debug-dump=info - | FileCheck %s + +; struct foo { +; } f; + +; CHECK: DW_TAG_type_unit +; CHECK-NEXT: DW_AT_language [DW_FORM_data2] (0x000c) + +%struct.foo = type {} + +@f = common global %struct.foo zeroinitializer, align 1 + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!7, !8} +!llvm.ident = !{!9} + +!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.5 ", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !2, metadata !3, metadata !2, metadata !""} ; [ DW_TAG_compile_unit ] [/tmp/dbginfo/simple.c] [DW_LANG_C99] +!1 = metadata !{metadata !"simple.c", metadata !"/tmp/dbginfo"} +!2 = metadata !{i32 0} +!3 = metadata !{metadata !4} +!4 = metadata !{i32 786484, i32 0, null, metadata !"f", metadata !"f", metadata !"", metadata !5, i32 2, metadata !6, i32 0, i32 1, %struct.foo* @f, null} ; [ DW_TAG_variable ] [f] [line 2] [def] +!5 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] [/tmp/dbginfo/simple.c] +!6 = metadata !{i32 786451, metadata !1, null, metadata !"foo", i32 1, i64 0, i64 8, i32 0, i32 0, null, metadata !2, i32 0, null, null, null} ; [ DW_TAG_structure_type ] [foo] [line 1, size 0, align 8, offset 0] [def] [from ] +!7 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} +!8 = metadata !{i32 1, metadata !"Debug Info Version", i32 1} +!9 = metadata !{metadata !"clang version 3.5 "} -- cgit v1.2.3