forked from OSchip/llvm-project
Replace use of Triple::getEnvironmentName with the simpler
Triple::getEnvironment. llvm-svn: 197181
This commit is contained in:
parent
b5649b853d
commit
782e6aab1f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue