diff options
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/Bitcode/upgrade-debug-info-for-profiling.ll | 10 | ||||
-rw-r--r-- | llvm/test/Bitcode/upgrade-debug-info-for-profiling.ll.bc | bin | 0 -> 888 bytes | |||
-rw-r--r-- | llvm/test/DebugInfo/Generic/gmlt.ll (renamed from llvm/test/DebugInfo/Inputs/gmlt.ll) | 11 | ||||
-rw-r--r-- | llvm/test/DebugInfo/Generic/gmlt.test | 6 | ||||
-rw-r--r-- | llvm/test/DebugInfo/Generic/gmlt_profiling.ll | 35 | ||||
-rw-r--r-- | llvm/test/DebugInfo/X86/gmlt.test | 4 |
6 files changed, 51 insertions, 15 deletions
diff --git a/llvm/test/Bitcode/upgrade-debug-info-for-profiling.ll b/llvm/test/Bitcode/upgrade-debug-info-for-profiling.ll new file mode 100644 index 00000000000..d50f87fa620 --- /dev/null +++ b/llvm/test/Bitcode/upgrade-debug-info-for-profiling.ll @@ -0,0 +1,10 @@ +; RUN: llvm-dis < %s.bc | FileCheck %s +; RUN: verify-uselistorder < %s.bc + +!llvm.module.flags = !{!0} +!0 = !{i32 2, !"Debug Info Version", i32 3} + +!llvm.dbg.cu = !{!1} +; CHECK: DICompileUnit(language: DW_LANG_C99, file: !{{[0-9]+}}, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, emissionKind: FullDebug) +!2 = !DIFile(filename: "foo.c", directory: "/path/to/dir") diff --git a/llvm/test/Bitcode/upgrade-debug-info-for-profiling.ll.bc b/llvm/test/Bitcode/upgrade-debug-info-for-profiling.ll.bc Binary files differnew file mode 100644 index 00000000000..2bb54e9b3c5 --- /dev/null +++ b/llvm/test/Bitcode/upgrade-debug-info-for-profiling.ll.bc diff --git a/llvm/test/DebugInfo/Inputs/gmlt.ll b/llvm/test/DebugInfo/Generic/gmlt.ll index b6df50109ff..d75086dd50a 100644 --- a/llvm/test/DebugInfo/Inputs/gmlt.ll +++ b/llvm/test/DebugInfo/Generic/gmlt.ll @@ -1,4 +1,8 @@ ; REQUIRES: object-emission +; RUN: %llc_dwarf -O0 -filetype=obj < %S/gmlt.ll | llvm-dwarfdump - | FileCheck %S/gmlt.ll + +; There's a darwin specific test in X86/gmlt, so it's okay to XFAIL this here. +; XFAIL: darwin ; Generated from the following source compiled with clang++ -gmlt: ; void f1() {} @@ -76,13 +80,6 @@ ; CHECK-NOT: {{DW_TAG|DW_AT}} ; CHECK: NULL -; PROFILING: DW_TAG_subprogram -; PROFILING: DW_AT_name {{.*}} "f1" -; With -debug-info-for-profiling, we need to emit decl_file a-nd decl_line -; of the subprogram. -; PROFILING: DW_AT_decl_file -; PROFILING: DW_AT_decl_line - ; CHECK: .debug_ranges contents: ; ... some addresses (depends on platform (such as platforms with function diff --git a/llvm/test/DebugInfo/Generic/gmlt.test b/llvm/test/DebugInfo/Generic/gmlt.test deleted file mode 100644 index d098d1e9125..00000000000 --- a/llvm/test/DebugInfo/Generic/gmlt.test +++ /dev/null @@ -1,6 +0,0 @@ -; REQUIRES: object-emission -; RUN: %llc_dwarf -O0 -filetype=obj < %S/../Inputs/gmlt.ll | llvm-dwarfdump - | FileCheck %S/../Inputs/gmlt.ll -; RUN: %llc_dwarf -O0 -filetype=obj -debug-info-for-profiling < %S/../Inputs/gmlt.ll | llvm-dwarfdump - | FileCheck %S/../Inputs/gmlt.ll --check-prefixes=PROFILING - -; There's a darwin specific test in X86/gmlt, so it's okay to XFAIL this here. -; XFAIL: darwin diff --git a/llvm/test/DebugInfo/Generic/gmlt_profiling.ll b/llvm/test/DebugInfo/Generic/gmlt_profiling.ll new file mode 100644 index 00000000000..f989a73e63d --- /dev/null +++ b/llvm/test/DebugInfo/Generic/gmlt_profiling.ll @@ -0,0 +1,35 @@ +; REQUIRES: object-emission +; RUN: %llc_dwarf -O0 -filetype=obj < %S/gmlt_profiling.ll | llvm-dwarfdump - | FileCheck %S/gmlt_profiling.ll + +; There's a darwin specific test in X86/gmlt, so it's okay to XFAIL this here. +; XFAIL: darwin + +; CHECK: .debug_info +; CHECK: DW_TAG_subprogram +; CHECK-NOT: DW_TAG +; CHECK: DW_AT_name {{.*}} "f1" +; With debug-info-for-profiling attribute, we need to emit decl_file and +; decl_line of the subprogram. +; CHECK-NEXT: DW_AT_decl_file +; CHECK-NEXT: DW_AT_decl_line + +; Function Attrs: nounwind uwtable +define void @_Z2f1v() !dbg !4 { +entry: + ret void, !dbg !13 +} + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!10, !11} +!llvm.ident = !{!12} + +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2, debugInfoForProfiling: true) +!1 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo") +!2 = !{} +!4 = distinct !DISubprogram(name: "f1", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!5 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo") +!6 = !DISubroutineType(types: !2) +!10 = !{i32 2, !"Dwarf Version", i32 4} +!11 = !{i32 2, !"Debug Info Version", i32 3} +!12 = !{!"clang version 3.6.0 "} +!13 = !DILocation(line: 1, column: 12, scope: !4) diff --git a/llvm/test/DebugInfo/X86/gmlt.test b/llvm/test/DebugInfo/X86/gmlt.test index 6cdd71d68bd..15b829210d8 100644 --- a/llvm/test/DebugInfo/X86/gmlt.test +++ b/llvm/test/DebugInfo/X86/gmlt.test @@ -1,2 +1,2 @@ -; RUN: llc -O0 -filetype=obj < %S/../Inputs/gmlt.ll -mtriple x86_64-apple-darwin | llvm-dwarfdump - \ -; RUN: | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %S/../Inputs/gmlt.ll +; RUN: llc -O0 -filetype=obj < %S/../Generic/gmlt.ll -mtriple x86_64-apple-darwin | llvm-dwarfdump - \ +; RUN: | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %S/../Generic/gmlt.ll |