blob: 784f2f88d8b4cf504714260087218b112bac3b93 [file] [log] [blame]
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +00001// RUN: llvm-mc -g -triple i386-apple-darwin10 %s -filetype=obj -o %t
Adrian Prantl7bc1b282017-09-11 22:59:45 +00002// RUN: llvm-dwarfdump -debug-line %t | FileCheck %s
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +00003
4# 100 "t.s" 1
5.globl _bar
6_bar:
David Blaikiec714ef42014-03-17 01:52:11 +00007 movl $0, %eax
David Blaikie8bef7cd2014-03-17 01:52:04 +00008# 3 "inc/g.s"
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +00009 movl $0, %eax
10L1: leave
David Blaikie8bef7cd2014-03-17 01:52:04 +000011# 42 "t.s"
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +000012 ret
13
14// rdar://9275556
15
16// We check that the source name "t.s" is picked up
NAKAMURA Takumi3b3a4d92014-03-17 05:31:54 +000017// CHECK: include_directories[ 1] = '{{.*[/\\]}}test{{[/\\]}}MC{{[/\\]}}MachO'
David Blaikie8bef7cd2014-03-17 01:52:04 +000018// CHECK: include_directories[ 2] = 'inc'
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +000019// CHECK: Dir Mod Time File Len File Name
20// CHECK: ---- ---------- ---------- ---------------------------
21// CHECK: file_names[ 1] 1 0x00000000 0x00000000 gen-dwarf-cpp.s
22// CHECK: file_names[ 2] 0 0x00000000 0x00000000 t.s
David Blaikie8bef7cd2014-03-17 01:52:04 +000023// CHECK: file_names[ 3] 2 0x00000000 0x00000000 g.s
24// CHECK-NOT: file_names
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +000025
26// We check that the source line number 100 is picked up before the "movl"
Diego Novillo5b5cf502014-02-14 19:27:53 +000027// CHECK: Address Line Column File ISA Discriminator Flags
28// CHECK: ------------------ ------ ------ ------ --- ------------- -------------
29// CHECK: 0x0000000000000000 102 0 2 0 0 is_stmt