blob: c32bcbf580f53cbdbb0152e24b4f1ae67cc96f70 [file] [log] [blame]
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +00001// RUN: llvm-mc -g -triple i386-apple-darwin10 %s -filetype=obj -o %t
Eli Benderskye6abe832013-01-25 21:44:53 +00002// RUN: llvm-dwarfdump -debug-dump=line %t | FileCheck %s
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +00003
4# 100 "t.s" 1
5.globl _bar
6_bar:
David Blaikie8bef7cd2014-03-17 01:52:04 +00007# 3 "inc/g.s"
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +00008 movl $0, %eax
9L1: leave
David Blaikie8bef7cd2014-03-17 01:52:04 +000010# 42 "t.s"
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +000011 ret
12
13// rdar://9275556
14
15// We check that the source name "t.s" is picked up
David Blaikie8bef7cd2014-03-17 01:52:04 +000016// CHECK: include_directories[ 1] = '{{.*}}/test/MC/MachO'
17// CHECK: include_directories[ 2] = 'inc'
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +000018// CHECK: Dir Mod Time File Len File Name
19// CHECK: ---- ---------- ---------- ---------------------------
20// CHECK: file_names[ 1] 1 0x00000000 0x00000000 gen-dwarf-cpp.s
21// CHECK: file_names[ 2] 0 0x00000000 0x00000000 t.s
David Blaikie8bef7cd2014-03-17 01:52:04 +000022// CHECK: file_names[ 3] 2 0x00000000 0x00000000 g.s
23// CHECK-NOT: file_names
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +000024
25// We check that the source line number 100 is picked up before the "movl"
Diego Novillo5b5cf502014-02-14 19:27:53 +000026// CHECK: Address Line Column File ISA Discriminator Flags
27// CHECK: ------------------ ------ ------ ------ --- ------------- -------------
28// CHECK: 0x0000000000000000 102 0 2 0 0 is_stmt