[llvm-commits] [llvm] r147009 - /llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp

Jim Grosbach grosbach at apple.com
Tue Dec 20 15:11:01 PST 2011


Author: grosbach
Date: Tue Dec 20 17:11:00 2011
New Revision: 147009

URL: http://llvm.org/viewvc/llvm-project?rev=147009&view=rev
Log:
ARM .req register name aliases are case insensitive, just like regnames.

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=147009&r1=147008&r2=147009&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Tue Dec 20 17:11:00 2011
@@ -2325,9 +2325,10 @@
       .Default(0);
   }
   if (!RegNum) {
-    // Check for aliases registered via .req.
-    StringMap<unsigned>::const_iterator Entry =
-      RegisterReqs.find(Tok.getIdentifier());
+    // Check for aliases registered via .req. Canonicalize to lower case.
+    // That's more consistent since register names are case insensitive, and
+    // it's how the original entry was passed in from MC/MCParser/AsmParser.
+    StringMap<unsigned>::const_iterator Entry = RegisterReqs.find(lowerCase);
     // If no match, return failure.
     if (Entry == RegisterReqs.end())
       return -1;





More information about the llvm-commits mailing list