Skip to content

Commit

Permalink
[LLVM10] Memset requires MaybeAlign
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Jan 21, 2020
1 parent 3aeb3ec commit b81321d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/llvm-alloc-opt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,11 @@ void Optimizer::splitOnStack(CallInst *orig_inst)
offset - slot.offset);
auto sub_size = std::min(slot.offset + slot.size, offset + size) -
std::max(offset, slot.offset);
#if JL_LLVM_VERSION >= 100000
builder.CreateMemSet(ptr8, val_arg, sub_size, MaybeAlign(0));
#else
builder.CreateMemSet(ptr8, val_arg, sub_size, 0);
#endif
}
call->eraseFromParent();
return;
Expand Down

0 comments on commit b81321d

Please sign in to comment.