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

Renato Golin renato.golin at linaro.org
Tue Jun 2 08:44:22 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/Driver/Tools.cpp:5750
@@ -5749,3 +5749,3 @@
 /// getARMTargetCPU - Get the (LLVM) name of the ARM cpu we are targeting.
-StringRef arm::getARMTargetCPU(const ArgList &Args,
+std::string arm::getARMTargetCPU(const ArgList &Args,
                                const llvm::Triple &Triple) {
----------------
Don't you need to change the type in the callers, too? Otherwise, the StringRef will refer to a temp variable that may disappear until it's used.

================
Comment at: test/Driver/krait-cpu.c:8
@@ +7,2 @@
+// RUN: %clang -target arm-linux-gnueabi -mcpu=KRAIT -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CASE-INSENSITIVE-CPUV7A %s
+// CHECK-CASE-INSENSITIVE-CPUV7A: "-cc1"{{.*}} "-triple" "armv7-{{.*}}
----------------
You don't need a new CHECK line type, you could have re-used CHECK-CPUV7A

http://reviews.llvm.org/D10162

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






More information about the cfe-commits mailing list