Driver: avoid unnecessary string ops
Use an enumeration for the Floating Point ABIs supported on MIPS. This is
replicating the ARM change to avoid string based tracking of the floating point
ABI. NFC.
llvm-svn: 248083
diff --git a/clang/lib/Driver/Tools.h b/clang/lib/Driver/Tools.h
index 145fb0b..b1d5d69 100644
--- a/clang/lib/Driver/Tools.h
+++ b/clang/lib/Driver/Tools.h
@@ -253,6 +253,13 @@
namespace mips {
typedef enum { NanLegacy = 1, Nan2008 = 2 } NanEncoding;
+
+enum class FloatABI {
+ Invalid,
+ Soft,
+ Hard,
+};
+
NanEncoding getSupportedNanEncoding(StringRef &CPU);
void getMipsCPUAndABI(const llvm::opt::ArgList &Args,
const llvm::Triple &Triple, StringRef &CPUName,
@@ -261,9 +268,10 @@
bool isUCLibc(const llvm::opt::ArgList &Args);
bool isNaN2008(const llvm::opt::ArgList &Args, const llvm::Triple &Triple);
bool isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName,
- StringRef ABIName, StringRef FloatABI);
+ StringRef ABIName, mips::FloatABI FloatABI);
bool shouldUseFPXX(const llvm::opt::ArgList &Args, const llvm::Triple &Triple,
- StringRef CPUName, StringRef ABIName, StringRef FloatABI);
+ StringRef CPUName, StringRef ABIName,
+ mips::FloatABI FloatABI);
}
namespace ppc {