From fde0eb1f9ad4cbd5769484ad7707a2d45730904e Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Wed, 18 Aug 2021 11:11:02 -0700 Subject: [PATCH] [NFC] A couple more removeAttribute() cleanups --- llvm/lib/Transforms/Utils/BuildLibCalls.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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()); -- 2.7.4