Skip to content

Commit

Permalink
actually add the atributes (JuliaLang#44097)
Browse files Browse the repository at this point in the history
Co-authored-by: oscarddssmith <oscar.smith@juliacomputing.com>
  • Loading branch information
2 people authored and LilithHafner committed Mar 8, 2022
1 parent fb9aa5d commit 3fe20f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,9 @@ static AttributeList get_func_attrs(LLVMContext &C)
static AttributeList get_donotdelete_func_attrs(LLVMContext &C)
{
AttributeSet FnAttrs = AttributeSet::get(C, makeArrayRef({Attribute::get(C, "thunk")}));
FnAttrs.addAttribute(C, Attribute::InaccessibleMemOnly);
FnAttrs.addAttribute(C, Attribute::WillReturn);
FnAttrs.addAttribute(C, Attribute::NoUnwind);
FnAttrs = FnAttrs.addAttribute(C, Attribute::InaccessibleMemOnly);
FnAttrs = FnAttrs.addAttribute(C, Attribute::WillReturn);
FnAttrs = FnAttrs.addAttribute(C, Attribute::NoUnwind);
return AttributeList::get(C,
FnAttrs,
Attributes(C, {Attribute::NonNull}),
Expand Down Expand Up @@ -3480,7 +3480,7 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f,
// For now we emit this as a vararg call to the builtin
// (which doesn't look at the arguments). In the future,
// this should be an LLVM builtin.
auto it = builtin_func_map.find(jl_f_donotdelete);
auto it = builtin_func_map.find(jl_f_donotdelete_addr);
if (it == builtin_func_map.end()) {
return false;
}
Expand Down

0 comments on commit 3fe20f7

Please sign in to comment.