Skip to content

Commit 63113cf

Browse files
committed
Add test for dwarf verification JSON output (2/2)
1 parent 5d32648 commit 63113cf

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-completeness.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,4 @@
177177
.Lnames_abbrev_end0:
178178
.Lnames_entries0:
179179
.Lnames_end0:
180+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# RUN: llvm-mc %s -filetype obj -triple x86_64-apple-darwin -o - | llvm-dwarfdump -verify --verify-json=%t.json -
2+
# RUN: FileCheck %s --input-file %t.json
3+
4+
# CHECK: {"error-categories":{},"error-count":0}
5+
6+
# This test is meant to verify that the -verify option
7+
# in llvm-dwarfdump doesn't produce any .apple_names related
8+
# output when there's no such section in the object.
9+
# The test was manually modified to exclude the
10+
# .apple_names section from the apple_names_verify_num_atoms.s
11+
# test file in the same directory.
12+
13+
.section __TEXT,__text,regular,pure_instructions
14+
.file 1 "basic.c"
15+
.comm _i,4,2 ## @i
16+
.comm _j,4,2 ## @j
17+
.section __DWARF,__debug_str,regular,debug
18+
Linfo_string:
19+
.asciz "Apple LLVM version 8.1.0 (clang-802.0.35)" ## string offset=0
20+
.asciz "basic.c" ## string offset=42
21+
.asciz "/Users/sgravani/Development/tests" ## string offset=50
22+
.asciz "i" ## string offset=84
23+
.asciz "int" ## string offset=86
24+
.asciz "j" ## string offset=90
25+
26+
.section __DWARF,__debug_info,regular,debug
27+
Lsection_info:
28+
29+
.subsections_via_symbols
30+
.section __DWARF,__debug_line,regular,debug
31+
Lsection_line:
32+
Lline_table_start0:

0 commit comments

Comments
 (0)