llvm/test/MC/MachO/undefined-directional.s
Tim Northover 6d56779f41 AsmParser: record "# line file" context to calculate location for diag
Since we can't emit diagnostics for missing "jmp 1f" labels until the end of
the file, we need to be able to restore the context used to calculate
file/line. This is basically the "# line file" directive that's being used at
the time the expression is seen.

rdar://25706972

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266238 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-13 19:46:54 +00:00

12 lines
386 B
ArmAsm

// RUN: not llvm-mc -triple x86_64-apple-macosx -filetype=obj -o /dev/null %s 2>&1 | FileCheck %s
// CHECK: [[@LINE+1]]:{{[0-9]+}}: error: directional label undefined
jmp 1b
// CHECK: [[@LINE+1]]:{{[0-9]+}}: error: directional label undefined
jmp 1f
# 10 "wibble.s"
// CHECK: wibble.s:11:{{[0-9]+}}: error: directional label undefined
jmp 2f
# 42 "invalid.s"