mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
f0a90b93e6
Currently, the error messages we emit for the .org directive when the expression is not absolute or is out of range do not include the line number of the directive, so it can be hard to track down the problem if a file contains many .org directives. This patch stores the source location in the MCOrgFragment, so that it can be used for diagnostics emitted during layout. Since layout is an iterative process, and the errors are detected during each iteration, it would have been possible for errors to be reported multiple times. To prevent this, I've made the assembler bail out after each iteration if any errors have been reported. This will still allow multiple unrelated errors to be reported in the common case where they are all detected in the first round of layout. Differential Revision: https://reviews.llvm.org/D27411 llvm-svn: 289643
13 lines
223 B
ArmAsm
13 lines
223 B
ArmAsm
# RUN: not llvm-mc -filetype=obj -triple i386-unknown-unknown %s 2> %t
|
|
# RUN: FileCheck -input-file %t %s
|
|
|
|
. = 0x10
|
|
.byte 1
|
|
|
|
. = . + 10
|
|
.byte 2
|
|
|
|
# CHECK: error: invalid .org offset '24' (at offset '28')
|
|
. = 0x18
|
|
.byte 3
|