mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 03:46:02 +03:00
UseSoftFloat was removed from the TargetOptions in LLVM3.7. It's replacement (I believe) is the "+soft-float" target feature (in the target feature string). Inside LLVM, the "use-soft-float" attribute is upgraded to the "+soft-float" feature, so we can do that ourselves when creating the target machine.
(at the point where we add the attributes to the function, we have no access to whether our TargetMachine was created with FloatABI:SoftFP or not)
This commit is contained in:
parent
04f91f208e
commit
ed3afed77a
4 changed files with 19 additions and 12 deletions
|
@ -451,17 +451,6 @@ void applyTargetMachineAttributes(llvm::Function &func,
|
|||
func.addFnAttr("no-nans-fp-math", TO.NoNaNsFPMath ? "true" : "false");
|
||||
#if LDC_LLVM_VER < 307
|
||||
func.addFnAttr("use-soft-float", TO.UseSoftFloat ? "true" : "false");
|
||||
#else
|
||||
switch (TO.FloatABIType) {
|
||||
case llvm::FloatABI::Default:
|
||||
break;
|
||||
case llvm::FloatABI::Soft:
|
||||
func.addFnAttr("use-soft-float", "true");
|
||||
break;
|
||||
case llvm::FloatABI::Hard:
|
||||
func.addFnAttr("use-soft-float", "false");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Frame pointer elimination
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue