summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2018-04-25 23:50:55 +0000
committerRichard Trieu <rtrieu@google.com>2018-04-25 23:50:55 +0000
commit563296abd8a1b2a9f2cd6675094ea448d0adbf1f (patch)
tree2749d2fb307e755a40becb45e0bfb40e37feefbc /clang
parentf0562390e22b607976e6924ae67ac6474e59c72b (diff)
downloadbcm5719-llvm-563296abd8a1b2a9f2cd6675094ea448d0adbf1f.tar.gz
bcm5719-llvm-563296abd8a1b2a9f2cd6675094ea448d0adbf1f.zip
Switch to Clang's isDigit function.
std::isdigit can be overloaded, causing the template deduction to fail. Use Clang's isDigit function which to avoid this. Switch the other calls for consistency. llvm-svn: 330887
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Driver/ToolChains/Arch/RISCV.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Driver/ToolChains/Arch/RISCV.cpp b/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
index 4f0ddd679ce..9e675bd0cab 100644
--- a/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
+++ b/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
@@ -8,13 +8,13 @@
//===----------------------------------------------------------------------===//
#include "RISCV.h"
+#include "clang/Basic/CharInfo.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/Options.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Support/TargetParser.h"
#include "llvm/Support/raw_ostream.h"
-#include <cctype>
using namespace clang::driver;
using namespace clang::driver::tools;
@@ -57,7 +57,7 @@ static bool getExtensionVersion(const Driver &D, StringRef MArch,
auto I = In.begin();
auto E = In.end();
- while (I != E && isdigit(*I))
+ while (I != E && isDigit(*I))
Major.append(1, *I++);
if (Major.empty())
@@ -66,7 +66,7 @@ static bool getExtensionVersion(const Driver &D, StringRef MArch,
if (I != E && *I == 'p') {
++I;
- while (I != E && isdigit(*I))
+ while (I != E && isDigit(*I))
Minor.append(1, *I++);
// Expected 'p' to be followed by minor version number.
@@ -161,7 +161,7 @@ static void getExtensionFeatures(const Driver &D,
}
std::string Major, Minor;
- auto Pos = Name.find_if(std::isdigit);
+ auto Pos = Name.find_if(isDigit);
if (Pos != StringRef::npos) {
auto Next = Name.substr(Pos);
Name = Name.substr(0, Pos);
OpenPOWER on IntegriCloud