diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2013-12-12 21:29:27 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2013-12-12 21:29:27 +0000 |
commit | 782e6aab1f87f0649b4b92f2bd1bdfac174883a9 (patch) | |
tree | 5f2565bfe8fd068fb305b15241b48d6b448c7d63 /clang/lib/CodeGen/TargetInfo.cpp | |
parent | b5649b853dd2c222d09a9c6df65b00cfae4832a4 (diff) | |
download | bcm5719-llvm-782e6aab1f87f0649b4b92f2bd1bdfac174883a9.tar.gz bcm5719-llvm-782e6aab1f87f0649b4b92f2bd1bdfac174883a9.zip |
Replace use of Triple::getEnvironmentName with the simpler
Triple::getEnvironment.
llvm-svn: 197181
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index c09a85bd3d5..45f0096564b 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -3071,9 +3071,14 @@ public: } bool isEABI() const { - StringRef Env = getTarget().getTriple().getEnvironmentName(); - return (Env == "gnueabi" || Env == "eabi" || - Env == "android" || Env == "androideabi"); + switch (getTarget().getTriple().getEnvironment()) { + case llvm::Triple::Android: + case llvm::Triple::EABI: + case llvm::Triple::GNUEABI: + return true; + default: + return false; + } } ABIKind getABIKind() const { return Kind; } @@ -3209,7 +3214,7 @@ void ARMABIInfo::computeInfo(CGFunctionInfo &FI) const { /// Return the default calling convention that LLVM will use. llvm::CallingConv::ID ARMABIInfo::getLLVMDefaultCC() const { // The default calling convention that LLVM will infer. - if (getTarget().getTriple().getEnvironmentName()=="gnueabihf") + if (getTarget().getTriple().getEnvironment() == llvm::Triple::GNUEABIHF) return llvm::CallingConv::ARM_AAPCS_VFP; else if (isEABI()) return llvm::CallingConv::ARM_AAPCS; |