From: Arthur Eubanks Date: Wed, 18 Aug 2021 18:11:02 +0000 (-0700) Subject: [NFC] A couple more removeAttribute() cleanups X-Git-Tag: upstream/15.0.7~33588 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fde0eb1f9ad4cbd5769484ad7707a2d45730904e;p=platform%2Fupstream%2Fllvm.git [NFC] A couple more removeAttribute() cleanups --- diff --git a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp index 4118ee0..c17e7b7 100644 --- a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp +++ b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp @@ -1453,9 +1453,8 @@ static Value *emitUnaryFloatFnCallHelper(Value *Op, StringRef Name, // The incoming attribute set may have come from a speculatable intrinsic, but // is being replaced with a library call which is not allowed to be // speculatable. - CI->setAttributes(Attrs.removeAttribute(B.getContext(), - AttributeList::FunctionIndex, - Attribute::Speculatable)); + CI->setAttributes( + Attrs.removeFnAttribute(B.getContext(), Attribute::Speculatable)); if (const Function *F = dyn_cast(Callee.getCallee()->stripPointerCasts())) CI->setCallingConv(F->getCallingConv()); @@ -1498,9 +1497,8 @@ static Value *emitBinaryFloatFnCallHelper(Value *Op1, Value *Op2, // The incoming attribute set may have come from a speculatable intrinsic, but // is being replaced with a library call which is not allowed to be // speculatable. - CI->setAttributes(Attrs.removeAttribute(B.getContext(), - AttributeList::FunctionIndex, - Attribute::Speculatable)); + CI->setAttributes( + Attrs.removeFnAttribute(B.getContext(), Attribute::Speculatable)); if (const Function *F = dyn_cast(Callee.getCallee()->stripPointerCasts())) CI->setCallingConv(F->getCallingConv());