Fix a Mach-O assembler segfault for a subtraction expression with an undefined symbol.
[oota-llvm.git] / test / MC / MachO / gen-dwarf-macro-cpp.s
1 // RUN: llvm-mc -g -triple i386-apple-darwin10 %s -filetype=obj -o %t
2 // RUN: llvm-dwarfdump -debug-dump=line %t | FileCheck %s
3
4 # 1 "foo.S" 2
5 .macro switcher
6         ljmp *0x38(%ecx)
7 .endmacro
8         switcher NaClSwitchNoSSE, 0
9
10 // PR14264 was a crash in the code caused by the .macro not handled correctly
11 // rdar://12637628
12
13 // We check that the source name "foo.S" is picked up
14 // CHECK:                 Dir  Mod Time   File Len   File Name
15 // CHECK:                 ---- ---------- ---------- ---------------------------
16 // CHECK: file_names[  1]    1 0x00000000 0x00000000 gen-dwarf-macro-cpp.s
17 // CHECK: file_names[  2]    0 0x00000000 0x00000000 foo.S