[llvm] r203251 - ARM: Make .unreq directives case-insensitive
Duncan P. N. Exon Smith
dexonsmith at apple.com
Fri Mar 7 08:16:53 PST 2014
Author: dexonsmith
Date: Fri Mar 7 10:16:52 2014
New Revision: 203251
URL: http://llvm.org/viewvc/llvm-project?rev=203251&view=rev
Log:
ARM: Make .unreq directives case-insensitive
Be case-insensitive when processing .unreq directives.
Patch by Lin Zuojian!
Added:
llvm/trunk/test/MC/ARM/dot-req-case-insensitive.s
Modified:
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=203251&r1=203250&r2=203251&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Fri Mar 7 10:16:52 2014
@@ -8255,7 +8255,7 @@ bool ARMAsmParser::parseDirectiveUnreq(S
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;
}
Added: llvm/trunk/test/MC/ARM/dot-req-case-insensitive.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dot-req-case-insensitive.s?rev=203251&view=auto
==============================================================================
--- llvm/trunk/test/MC/ARM/dot-req-case-insensitive.s (added)
+++ llvm/trunk/test/MC/ARM/dot-req-case-insensitive.s Fri Mar 7 10:16:52 2014
@@ -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
More information about the llvm-commits
mailing list