diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2022-01-15 22:14:16 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2022-01-15 22:39:31 +0100 |
commit | c63a3175c2947e8c1a2d3bbe16a8586600705c54 (patch) | |
tree | 805c0ccdb58ef753a97ec9c4ee64a707247cbd54 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | c84b8be516bcc4d021ff804169d58a7b3104e050 (diff) | |
download | llvm-c63a3175c2947e8c1a2d3bbe16a8586600705c54.zip llvm-c63a3175c2947e8c1a2d3bbe16a8586600705c54.tar.gz llvm-c63a3175c2947e8c1a2d3bbe16a8586600705c54.tar.bz2 |
[AttrBuilder] Remove ctor accepting AttributeList and Index
Use the AttributeSet constructor instead. There's no good reason
why AttrBuilder itself should exact the AttributeSet from the
AttributeList. Moving this out of the AttrBuilder generally results
in cleaner code.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index bd6fc49..f710b9a 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3792,7 +3792,7 @@ llvm::Constant *CodeGenModule::GetOrCreateLLVMFunction( if (D) SetFunctionAttributes(GD, F, IsIncompleteFunction, IsThunk); if (ExtraAttrs.hasFnAttrs()) { - llvm::AttrBuilder B(F->getContext(), ExtraAttrs, llvm::AttributeList::FunctionIndex); + llvm::AttrBuilder B(F->getContext(), ExtraAttrs.getFnAttrs()); F->addFnAttrs(B); } |