IRGen: stop using the DisableFPElim target option

Use function attributes instead.  This is required for a newer LLVM
since it does not have the target option at all.

rdar://21480622

Swift SVN r29676
This commit is contained in:
Dmitri Hrybenko
2015-06-25 18:24:37 +00:00
parent 630a637948
commit 92897ea2c9
4 changed files with 15 additions and 3 deletions

View File

@@ -487,6 +487,13 @@ llvm::AttributeSet IRGenModule::constructInitialAttributes() {
attrsUpdated = attrsUpdated.addAttribute(LLVMContext,
llvm::AttributeSet::FunctionIndex,
"no-frame-pointer-elim", "false");
} else {
attrsUpdated = attrsUpdated.addAttribute(
LLVMContext, llvm::AttributeSet::FunctionIndex,
"no-frame-pointer-elim", "true");
attrsUpdated = attrsUpdated.addAttribute(
LLVMContext, llvm::AttributeSet::FunctionIndex,
"no-frame-pointer-elim-non-leaf");
}
// Add target-cpu and target-features if they are non-null.