Use StringRef::lower only once instead of calling ::tolower many times.

llvm-svn: 293142
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index d351eb1..d94d7a2 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -2054,18 +2054,20 @@
   uint32_t Flags = 0;
   uint32_t NotFlags = 0;
   bool Invert = false;
-  for (char C : next()) {
+
+  for (char C : next().lower()) {
     uint32_t Flag = 0;
     if (C == '!')
       Invert = !Invert;
-    else if (tolower(C) == 'w')
+    else if (C == 'w')
       Flag = SHF_WRITE;
-    else if (tolower(C) == 'x')
+    else if (C == 'x')
       Flag = SHF_EXECINSTR;
-    else if (tolower(C) == 'a')
+    else if (C == 'a')
       Flag = SHF_ALLOC;
-    else if (tolower(C) != 'r')
+    else if (C != 'r')
       setError("invalid memory region attribute");
+
     if (Invert)
       NotFlags |= Flag;
     else