Recommitting r275284: add support to inline __builtin_mempcpy

Patch by Sunita Marathe

Third try, now following fixes to MSan to handle mempcy in such a way that this commit won't break the MSan buildbots. (Thanks, Evegenii!)

llvm-svn: 277189
This commit is contained in:
Andrew Kaylor
2016-07-29 18:23:18 +00:00
parent 0d56e05a12
commit b99d1cc7ed
9 changed files with 88 additions and 1 deletions

View File

@@ -644,6 +644,7 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy,
return false;
// fallthrough
case LibFunc::memcpy:
case LibFunc::mempcpy:
case LibFunc::memmove:
return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) &&
FTy.getParamType(0)->isPointerTy() &&