diff options
author | Coby Tayree <coby.tayree@intel.com> | 2017-04-08 20:29:03 +0000 |
---|---|---|
committer | Coby Tayree <coby.tayree@intel.com> | 2017-04-08 20:29:03 +0000 |
commit | bedaae0d069f9c6d4b31d0745e2b51f657446380 (patch) | |
tree | e1e5ceca3ae720a1e17365c99ad121b878dd0796 /llvm/test/MC | |
parent | 151748b64d98c54d9af524c1d7aab6c8d37d982e (diff) | |
download | bcm5719-llvm-bedaae0d069f9c6d4b31d0745e2b51f657446380.tar.gz bcm5719-llvm-bedaae0d069f9c6d4b31d0745e2b51f657446380.zip |
[AsmParser]Emit an error if a macro has two (or more) parameters sharing the same name
Introducing a new error to macro parameters' parsing:
currently, llvm-mc won't complain if a macro have two (or more) named params with the same name.
this behavior is false, as there's no merit in having some params sharing a name.
now, instead of tolerate such a phenomena - emit an appropriate error.
Differential Revision: https://reviews.llvm.org/D31674
llvm-svn: 299815
Diffstat (limited to 'llvm/test/MC')
-rw-r--r-- | llvm/test/MC/AsmParser/macro-duplicate-params-names-err.s | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/MC/AsmParser/macro-duplicate-params-names-err.s b/llvm/test/MC/AsmParser/macro-duplicate-params-names-err.s new file mode 100644 index 00000000000..618cce02abd --- /dev/null +++ b/llvm/test/MC/AsmParser/macro-duplicate-params-names-err.s @@ -0,0 +1,7 @@ +// RUN: not llvm-mc %s 2> %t +// RUN: FileCheck < %t %s + +.macro M a a +.endm + +// CHECK: macro 'M' has multiple parameters named 'a' |