Skip to content

Commit

Permalink
Use setAttributes instead of addAttributes/removeAttributes
Browse files Browse the repository at this point in the history
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
  • Loading branch information
troels and vtjnash authored Aug 24, 2021
1 parent 71d2916 commit 70b600b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5180,11 +5180,10 @@ static Function* gen_cfun_wrapper(
// Skip past function and return and sret attributes to the first real parameter
for (auto it = attributes.index_begin() + 2 + sig.sret; it != attributes.index_end(); ++it) {
AttrBuilder toShiftTemp(attributes.getAttributes(it));
attributes = attributes.removeAttributes(jl_LLVMContext, it);
attributes = attributes.addAttributes(jl_LLVMContext, it, toShift);
attributes = attributes.setAttributes(jl_LLVMContext, it, toShift);
toShift = std::move(toShiftTemp);
}
attributes = attributes.addAttributes(jl_LLVMContext, attributes.index_end(), toShift);
attributes = attributes.setAttributes(jl_LLVMContext, attributes.index_end(), toShift);
}

functype = FunctionType::get(sig.sret ? T_void : sig.prt, fargt_sig, /*isVa*/false);
Expand Down

0 comments on commit 70b600b

Please sign in to comment.