blob: 3cb26ce6081ff4184f3d3ff83b776c1f4377f337 [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
Paul Robinson7b98be22018-02-06 00:43:26 +000017// CHECK: include_directories[ 1] = "{{.*(/|\\\\)}}test{{(/|\\\\)}}MC{{(/|\\\\)}}MachO"
Paul Robinson0a227092018-02-05 20:43:15 +000018// CHECK: include_directories[ 2] = "inc"
Scott Linder16c7bda2018-02-23 23:01:06 +000019// CHECK: file_names[ 1]:
20// CHECK-NEXT: name: "gen-dwarf-cpp.s"
21// CHECK-NEXT: dir_index: 1
22// CHECK: file_names[ 2]:
23// CHECK-NEXT: name: "t.s"
24// CHECK-NEXT: dir_index: 0
25// CHECK: file_names[ 3]:
26// CHECK-NEXT: name: "g.s"
27// CHECK-NEXT: dir_index: 2
David Blaikie8bef7cd2014-03-17 01:52:04 +000028// CHECK-NOT: file_names
Kevin Enderby4eaf8ef2012-11-01 17:31:35 +000029
30// We check that the source line number 100 is picked up before the "movl"
Diego Novillo5b5cf502014-02-14 19:27:53 +000031// CHECK: Address Line Column File ISA Discriminator Flags
32// CHECK: ------------------ ------ ------ ------ --- ------------- -------------
33// CHECK: 0x0000000000000000 102 0 2 0 0 is_stmt