diff options
Diffstat (limited to 'contrib/llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp')
-rw-r--r-- | contrib/llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp b/contrib/llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp index f37795e961e8..4fc3fe0f105b 100644 --- a/contrib/llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp +++ b/contrib/llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp @@ -995,8 +995,10 @@ Function *AMDGPULibFunc::getOrInsertFunction(Module *M, } else { AttributeList Attr; LLVMContext &Ctx = M->getContext(); - Attr.addAttribute(Ctx, AttributeList::FunctionIndex, Attribute::ReadOnly); - Attr.addAttribute(Ctx, AttributeList::FunctionIndex, Attribute::NoUnwind); + Attr = Attr.addAttribute(Ctx, AttributeList::FunctionIndex, + Attribute::ReadOnly); + Attr = Attr.addAttribute(Ctx, AttributeList::FunctionIndex, + Attribute::NoUnwind); C = M->getOrInsertFunction(FuncName, FuncTy, Attr); } |