mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-24 21:00:36 +00:00
[TargetLibraryInfo] Reduce code duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273241 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4eee89ed21
commit
9ce55a284e
@ -596,7 +596,6 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy,
|
||||
case LibFunc::strtok_r:
|
||||
return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy());
|
||||
case LibFunc::scanf:
|
||||
return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy());
|
||||
case LibFunc::setbuf:
|
||||
case LibFunc::setvbuf:
|
||||
return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy());
|
||||
@ -604,13 +603,9 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy,
|
||||
case LibFunc::strndup:
|
||||
return (NumParams >= 1 && FTy.getReturnType()->isPointerTy() &&
|
||||
FTy.getParamType(0)->isPointerTy());
|
||||
case LibFunc::sscanf:
|
||||
case LibFunc::stat:
|
||||
case LibFunc::statvfs:
|
||||
return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() &&
|
||||
FTy.getParamType(1)->isPointerTy());
|
||||
case LibFunc::sscanf:
|
||||
return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() &&
|
||||
FTy.getParamType(1)->isPointerTy());
|
||||
case LibFunc::sprintf:
|
||||
return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() &&
|
||||
FTy.getParamType(1)->isPointerTy());
|
||||
@ -674,7 +669,6 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy,
|
||||
case LibFunc::read:
|
||||
return (NumParams == 3 && FTy.getParamType(1)->isPointerTy());
|
||||
case LibFunc::rewind:
|
||||
return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy());
|
||||
case LibFunc::rmdir:
|
||||
case LibFunc::remove:
|
||||
case LibFunc::realpath:
|
||||
@ -688,8 +682,6 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy,
|
||||
case LibFunc::write:
|
||||
return (NumParams == 3 && FTy.getParamType(1)->isPointerTy());
|
||||
case LibFunc::bcopy:
|
||||
return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() &&
|
||||
FTy.getParamType(1)->isPointerTy());
|
||||
case LibFunc::bcmp:
|
||||
return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() &&
|
||||
FTy.getParamType(1)->isPointerTy());
|
||||
|
Loading…
x
Reference in New Issue
Block a user