[BuildLibCalls] Add noalias for strcat and stpcpy
authorDávid Bolvanský <david.bolvansky@gmail.com>
Sun, 27 Sep 2020 19:32:32 +0000 (21:32 +0200)
committerDávid Bolvanský <david.bolvansky@gmail.com>
Sun, 27 Sep 2020 19:37:09 +0000 (21:37 +0200)
commit155ac333945d7af507bb28dc6f2539300a4c0666
tree1731bdc9aeb7704a484d9e3f4f3a3a5bd7cb871c
parent0103df7903b328aa4ca8116a5c4cb4c01d48ea7d
[BuildLibCalls] Add noalias for strcat and stpcpy

strcat:
destination and source shall not overlap. (http://www.cplusplus.com/reference/cstring/strcat/)

stpcpy:
The strings may not overlap, and the destination string dest must be  large enough to receive the copy. (https://man7.org/linux/man-pages/man3/stpcpy.3.html)

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D88335
llvm/lib/Transforms/Utils/BuildLibCalls.cpp
llvm/test/Transforms/InferFunctionAttrs/annotate.ll