llvm-6502/test/MC/ARM/Windows/invalid-relocation.s
Saleem Abdulrasool 3f6dea4864 ARM: fail less catastrophically on invalid Windows input
Windows supports a restricted set of relocations (compared to ARM ELF).  In some
cases, we may end up generating an unsupported relocation.  This can occur with
bad input to the assembler in particular (the frontend should never generate
code that cannot be compiled).  Generate an error rather than just aborting.

The change in the API is driven by the desire to provide a slightly more helpful
message for debugging purposes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226779 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22 04:03:32 +00:00

15 lines
325 B
ArmAsm

# RUN: not llvm-mc -triple thumbv7-windows -filetype obj -o /dev/null 2>&1 %s \
# RUN: | FileCheck %s
.def invalid_relocation
.type 32
.scl 2
.endef
.global invalid_relocation
.thumb_func
invalid_relocation:
adr r0, invalid_relocation+1
# CHECK: LLVM ERROR: unsupported relocation type: fixup_t2_adr_pcrel_12