diff options
author | Chad Rosier <mcrosier@codeaurora.org> | 2017-01-19 20:06:32 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@codeaurora.org> | 2017-01-19 20:06:32 +0000 |
commit | 9245e12f95b6eee638d6ced013b91c5ee364e940 (patch) | |
tree | 0d418d901f59f286533d883110f11965aa905ddd /llvm/test/MC | |
parent | f2d9a46b5ff059f002602c7d6199bda1993435dd (diff) | |
download | bcm5719-llvm-9245e12f95b6eee638d6ced013b91c5ee364e940.tar.gz bcm5719-llvm-9245e12f95b6eee638d6ced013b91c5ee364e940.zip |
[Assembler] Improve error when unable to evaluate expression.
Add a SMLoc to MCExpr. Most code does not generate or consume the SMLoc (yet).
Patch by Sanne Wouda <sanne.wouda@arm.com>!
Differential Revision: https://reviews.llvm.org/D28861
llvm-svn: 292515
Diffstat (limited to 'llvm/test/MC')
-rw-r--r-- | llvm/test/MC/AArch64/error-location-post-layout.s | 9 | ||||
-rw-r--r-- | llvm/test/MC/ARM/error-location-post-layout.s | 12 |
2 files changed, 9 insertions, 12 deletions
diff --git a/llvm/test/MC/AArch64/error-location-post-layout.s b/llvm/test/MC/AArch64/error-location-post-layout.s index 8b41c6780b3..64e2951efba 100644 --- a/llvm/test/MC/AArch64/error-location-post-layout.s +++ b/llvm/test/MC/AArch64/error-location-post-layout.s @@ -1,14 +1,11 @@ // RUN: not llvm-mc -triple aarch64--none-eabi -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s -// Note: These errors are not always emitted in the order in which the relevant -// source appears, this file is carefully ordered so that that is the case. - -// CHECK: <unknown>:0: error: expression could not be evaluated .set v1, -undef +// CHECK: <unknown>:0: error: expression could not be evaluated .comm common, 4 -// CHECK: <unknown>:0: error: Common symbol 'common' cannot be used in assignment expr .set v3, common +// CHECK: 7:12: error: Common symbol 'common' cannot be used in assignment expr -// CHECK: <unknown>:0: error: symbol 'undef' could not be evaluated in a subtraction expression .set v2, a-undef +// CHECK: 10:13: error: symbol 'undef' could not be evaluated in a subtraction expression diff --git a/llvm/test/MC/ARM/error-location-post-layout.s b/llvm/test/MC/ARM/error-location-post-layout.s index d6a59fd1738..637f5941976 100644 --- a/llvm/test/MC/ARM/error-location-post-layout.s +++ b/llvm/test/MC/ARM/error-location-post-layout.s @@ -1,14 +1,14 @@ @ RUN: not llvm-mc -triple armv7a--none-eabi -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s -@ Note: These errors are not always emitted in the order in which the relevant -@ source appears, this file is carefully ordered so that that is the case. - -@ CHECK: <unknown>:0: error: expression could not be evaluated .set v1, -undef +@ CHECK: <unknown>:0: error: expression could not be evaluated .comm common, 4 -@ CHECK: <unknown>:0: error: Common symbol 'common' cannot be used in assignment expr .set v3, common +@ CHECK: 7:12: error: Common symbol 'common' cannot be used in assignment expr -@ CHECK: <unknown>:0: error: symbol 'undef' could not be evaluated in a subtraction expression .set v2, a-undef +@ CHECK-DAG: 10:13: error: symbol 'undef' could not be evaluated in a subtraction expression + + .equ STACK_START, (a + undef) +@ CHECK-DAG: 13:24: error: expression could not be evaluated |