diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp index 0484f1dcfb243..e01fc6c10466e 100644 --- a/llvm/lib/Analysis/TargetLibraryInfo.cpp +++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp @@ -1491,25 +1491,9 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, } case LibFunc_rust_alloc: - return (NumParams == 3 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isIntegerTy() && - FTy.getParamType(1)->isIntegerTy() && - FTy.getParamType(2)->isPointerTy()); - case LibFunc_rust_dealloc: - return (NumParams == 3 && FTy.getReturnType()->isVoidTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - FTy.getParamType(2)->isIntegerTy()); - case LibFunc_rust_realloc: - return (NumParams == 6 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - FTy.getParamType(2)->isIntegerTy() && - FTy.getParamType(3)->isIntegerTy() && - FTy.getParamType(4)->isIntegerTy() && - FTy.getParamType(5)->isPointerTy()); + return true; case LibFunc::NumLibFuncs: case LibFunc::NotLibFunc: