[PATCH] Allow case-insensitive values for -mcpu for ARM in line with GCC.

Renato Golin renato.golin at linaro.org
Mon Jun 1 12:00:01 PDT 2015


I agree a test for krait is needed.

cheers,
--renato


REPOSITORY
  rL LLVM

================
Comment at: lib/Driver/Tools.cpp:5755
@@ -5754,3 +5754,3 @@
   if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) {
-    StringRef MCPU = A->getValue();
+    StringRef MCPU = StringRef(A->getValue()).lower();
     // Handle -mcpu=native.
----------------
Voicing Craig Topper's comment on the list:

"lower returns an std::string which will be immediately deleted leaving the MCPU StringRef pointing at stale memory. MCPU should be a std::string"

http://reviews.llvm.org/D10162

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list