From 097a3e3d957f1539c7ccb7c417300e9f838f4b28 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Wed, 18 Jul 2018 12:36:25 +0000 Subject: ARM: deduplicate hard-float detection code. NFC. ARMSubtarget had a copy/pasted block to determine whether the target was hard-float, but it just delegated to triple features anyway so it's better at the TargetMachine level. llvm-svn: 337384 --- llvm/lib/Target/ARM/ARMTargetMachine.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'llvm/lib/Target/ARM/ARMTargetMachine.cpp') diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp index bc2525b6b42..3189e85b8ca 100644 --- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp +++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp @@ -215,11 +215,7 @@ ARMBaseTargetMachine::ARMBaseTargetMachine(const Target &T, const Triple &TT, // Default to triple-appropriate float ABI if (Options.FloatABIType == FloatABI::Default) { - if (TargetTriple.getEnvironment() == Triple::GNUEABIHF || - TargetTriple.getEnvironment() == Triple::MuslEABIHF || - TargetTriple.getEnvironment() == Triple::EABIHF || - TargetTriple.isOSWindows() || - TargetABI == ARMBaseTargetMachine::ARM_ABI_AAPCS16) + if (isTargetHardFloat()) this->Options.FloatABIType = FloatABI::Hard; else this->Options.FloatABIType = FloatABI::Soft; -- cgit v1.2.3