1
Fork 0

Use IRBuilder to create memset

To avoid creating memsets with outdated signature. For some reason
SROA chokes on this when using NewPM.
This commit is contained in:
Nikita Popov 2020-01-05 22:32:15 +01:00
parent cd5441faf4
commit 03a73fa2cf
4 changed files with 27 additions and 10 deletions

View file

@ -1296,6 +1296,14 @@ extern "C" LLVMValueRef LLVMRustBuildMemMove(LLVMBuilderRef B,
#endif
}
extern "C" LLVMValueRef LLVMRustBuildMemSet(LLVMBuilderRef B,
LLVMValueRef Dst, unsigned DstAlign,
LLVMValueRef Val,
LLVMValueRef Size, bool IsVolatile) {
return wrap(unwrap(B)->CreateMemSet(
unwrap(Dst), unwrap(Val), unwrap(Size), DstAlign, IsVolatile));
}
extern "C" LLVMValueRef
LLVMRustBuildInvoke(LLVMBuilderRef B, LLVMValueRef Fn, LLVMValueRef *Args,
unsigned NumArgs, LLVMBasicBlockRef Then,