forked from OSchip/llvm-project
[SimplifyLibCalls] Fix -Wunused-result after D53342/r372091
llvm-svn: 372096
This commit is contained in:
parent
957b9cdd26
commit
8351763709
|
@ -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