[MemoryLocation] Support memcpy_chk in getForArgument.
authorFlorian Hahn <flo@fhahn.com>
Thu, 24 Nov 2022 19:17:48 +0000 (19:17 +0000)
committerFlorian Hahn <flo@fhahn.com>
Thu, 24 Nov 2022 19:17:48 +0000 (19:17 +0000)
commitae852750b34a842c33e0cc94aafd331742f980f0
tree2ef5ba061422f917c45d1dcdd98028912fc96283
parent9e1650951b16120ce86b244ed2337dc1acb39d65
[MemoryLocation] Support memcpy_chk in getForArgument.

Similar to 9f9e8ba114ce, add support for memcyp_chk to
MemoryLocation::getForArgument.

The size argument for memcpy_chk is an upper bound for the size of the
pointer argument. memcpy_chk may read/write less than the specified length,
if it exceeds the specified max size and aborts.

Reviewed By: xbolva00, jdoerfert

Differential Revision: https://reviews.llvm.org/D138613
llvm/lib/Analysis/MemoryLocation.cpp
llvm/test/Analysis/BasicAA/libfuncs.ll