diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-03-07 16:16:52 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-03-07 16:16:52 +0000 |
commit | 29db0eb8554a91c060cd5c4d59d374974c2a715e (patch) | |
tree | f0f4580ff974c4926fe1f2e83f70d763faf5bdb1 | |
parent | b2b8b1dc669c2a486e0841f6ac6aab6dc5cc6ec0 (diff) | |
download | llvm-29db0eb8554a91c060cd5c4d59d374974c2a715e.zip llvm-29db0eb8554a91c060cd5c4d59d374974c2a715e.tar.gz llvm-29db0eb8554a91c060cd5c4d59d374974c2a715e.tar.bz2 |
ARM: Make .unreq directives case-insensitive
Be case-insensitive when processing .unreq directives.
Patch by Lin Zuojian!
llvm-svn: 203251
-rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 2 | ||||
-rw-r--r-- | llvm/test/MC/ARM/dot-req-case-insensitive.s | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 7dc4d18..4b41a0d 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -8255,7 +8255,7 @@ bool ARMAsmParser::parseDirectiveUnreq(SMLoc L) { Error(L, "unexpected input in .unreq directive."); return false; } - RegisterReqs.erase(Parser.getTok().getIdentifier()); + RegisterReqs.erase(Parser.getTok().getIdentifier().lower()); Parser.Lex(); // Eat the identifier. return false; } diff --git a/llvm/test/MC/ARM/dot-req-case-insensitive.s b/llvm/test/MC/ARM/dot-req-case-insensitive.s new file mode 100644 index 0000000..c1ca566 --- /dev/null +++ b/llvm/test/MC/ARM/dot-req-case-insensitive.s @@ -0,0 +1,20 @@ +@ RUN: llvm-mc -triple=arm < %s | FileCheck %s + .syntax unified +_foo: + + OBJECT .req r2 + mov r4, OBJECT + mov r4, oBjEcT + .unreq oBJECT + +_foo2: + OBJECT .req r5 + mov r4, OBJECT + .unreq OBJECT + +@ CHECK-LABEL: _foo: +@ CHECK: mov r4, r2 +@ CHECK: mov r4, r2 + +@ CHECK-LABEL: _foo2: +@ CHECK: mov r4, r5 |