diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Target/Mips/Mips16HardFloat.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Target/Mips/Mips16HardFloat.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/contrib/llvm-project/llvm/lib/Target/Mips/Mips16HardFloat.cpp b/contrib/llvm-project/llvm/lib/Target/Mips/Mips16HardFloat.cpp index 6c5f63804d19..203e05dde7ad 100644 --- a/contrib/llvm-project/llvm/lib/Target/Mips/Mips16HardFloat.cpp +++ b/contrib/llvm-project/llvm/lib/Target/Mips/Mips16HardFloat.cpp @@ -408,12 +408,9 @@ static bool fixupFPReturnAndCall(Function &F, Module *M, // during call setup, the proper call lowering to the helper // functions will take place. // - A = A.addAttribute(C, AttributeList::FunctionIndex, - "__Mips16RetHelper"); - A = A.addAttribute(C, AttributeList::FunctionIndex, - Attribute::ReadNone); - A = A.addAttribute(C, AttributeList::FunctionIndex, - Attribute::NoInline); + A = A.addFnAttribute(C, "__Mips16RetHelper"); + A = A.addFnAttribute(C, Attribute::ReadNone); + A = A.addFnAttribute(C, Attribute::NoInline); FunctionCallee F = (M->getOrInsertFunction(Name, A, MyVoid, T)); CallInst::Create(F, Params, "", &I); } else if (const CallInst *CI = dyn_cast<CallInst>(&I)) { @@ -485,11 +482,11 @@ static void removeUseSoftFloat(Function &F) { AttrBuilder B; LLVM_DEBUG(errs() << "removing -use-soft-float\n"); B.addAttribute("use-soft-float", "false"); - F.removeAttributes(AttributeList::FunctionIndex, B); + F.removeFnAttrs(B); if (F.hasFnAttribute("use-soft-float")) { LLVM_DEBUG(errs() << "still has -use-soft-float\n"); } - F.addAttributes(AttributeList::FunctionIndex, B); + F.addFnAttrs(B); } // This pass only makes sense when the underlying chip has floating point but |