1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/test/MC/MachO/ARM/bad-darwin-ARM-reloc.s
Oliver Stannard e538054e6d [Assembler] Make fatal assembler errors non-fatal
Currently, if the assembler encounters an error after parsing (such as an
out-of-range fixup), it reports this as a fatal error, and so stops after the
first error. However, for most of these there is an obvious way to recover
after emitting the error, such as emitting the fixup with a value of zero. This
means that we can report on all of the errors in a file, not just the first
one. MCContext::reportError records the fact that an error was encountered, so
we won't actually emit an object file with the incorrect contents.

Differential Revision: http://reviews.llvm.org/D14717

llvm-svn: 253328
2015-11-17 10:00:43 +00:00

16 lines
471 B
ArmAsm

@ RUN: not llvm-mc -n -triple armv7-apple-darwin10 %s -filetype=obj -o - 2> %t.err > %t
@ RUN: FileCheck --check-prefix=CHECK-ERROR < %t.err %s
@ rdar://15586725
.text
ldr r3, L___fcommon
.section myseg, mysect
L___fcommon:
.word 0
@ CHECK-ERROR: unsupported relocation on symbol
c:
.word a - b
@ CHECK-ERROR: symbol 'a' can not be undefined in a subtraction expression
.word c - b
@ CHECK-ERROR: symbol 'b' can not be undefined in a subtraction expression