1## Make sure that using -g (or equivalent) on an asm file that already has 2## debug-info directives in it will correctly ignore the -g and produce 3## debug info corresponding to the directives in the source. 4## Note gcc accepts ".file 1" after a label, although not after an opcode. 5## If no other directives appear, gcc emits no debug info at all. 6 7# RUN: llvm-mc -g -triple i386-unknown-unknown -filetype=obj %s -o %t 8# RUN: llvm-dwarfdump -debug-info -debug-line %t | FileCheck %s 9 10foo: 11 .file 1 "a.c" 12 .loc 1 1 1 13 nop 14 15# CHECK: .debug_info 16## gcc does generate a DW_TAG_compile_unit in this case, with or without 17## -g on the command line, but we do not. 18# CHECK-EMPTY: 19# CHECK_NEXT: .debug_line 20# CHECK: file_names[ 1]: 21# CHECK-NEXT: name: "a.c" 22# CHECK-NEXT: dir_index: 0 23# CHECK: 0x{{0+}}0 1 1 1 0 0 is_stmt 24# CHECK: 0x{{0+}}1 1 1 1 0 0 is_stmt end_sequence 25