summaryrefslogtreecommitdiff
path: root/lib/Target/AMDGPU/AMDGPULibFunc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/AMDGPU/AMDGPULibFunc.cpp')
-rw-r--r--lib/Target/AMDGPU/AMDGPULibFunc.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/AMDGPU/AMDGPULibFunc.cpp b/lib/Target/AMDGPU/AMDGPULibFunc.cpp
index 4671273d61f91..4fc3fe0f105b0 100644
--- a/lib/Target/AMDGPU/AMDGPULibFunc.cpp
+++ b/lib/Target/AMDGPU/AMDGPULibFunc.cpp
@@ -90,7 +90,6 @@ class UnmangledFuncInfo {
public:
using ID = AMDGPULibFunc::EFuncId;
- UnmangledFuncInfo() = default;
UnmangledFuncInfo(StringRef _Name, unsigned _NumArgs)
: Name(_Name), NumArgs(_NumArgs) {}
// Get index to Table by function name.
@@ -996,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);
}