mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[SimplifyLibCalls] Fix -Wunused-result after D53342/r372091
llvm-svn: 372096
This commit is contained in:
parent
23ec32776c
commit
540b06dd3a
@ -612,7 +612,8 @@ Value *LibCallSimplifier::optimizeStrNCpy(CallInst *CI, IRBuilder<> &B) {
|
||||
// strncpy(x, "", y) -> memset(align 1 x, '\0', y)
|
||||
CallInst *NewCI = B.CreateMemSet(Dst, B.getInt8('\0'), Size, 1);
|
||||
AttrBuilder ArgAttrs(CI->getAttributes().getParamAttributes(0));
|
||||
NewCI->getAttributes().addParamAttributes(CI->getContext(), 0, ArgAttrs);
|
||||
NewCI->setAttributes(NewCI->getAttributes().addParamAttributes(
|
||||
CI->getContext(), 0, ArgAttrs));
|
||||
return Dst;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user