From 40d6804d2a2d24478938cd38e7192047e5d8da1c Mon Sep 17 00:00:00 2001 From: Jake Hughes Date: Tue, 9 Feb 2021 16:25:58 +0000 Subject: [PATCH] Remove type checks --- llvm/lib/Analysis/TargetLibraryInfo.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp index 99ab6412604aab..e01fc6c10466e8 100644 --- a/llvm/lib/Analysis/TargetLibraryInfo.cpp +++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp @@ -1491,22 +1491,9 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, } case LibFunc_rust_alloc: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isIntegerTy() && - FTy.getParamType(1)->isIntegerTy()); - 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 == 4 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - FTy.getParamType(2)->isIntegerTy() && - FTy.getParamType(3)->isIntegerTy()); + return true; case LibFunc::NumLibFuncs: case LibFunc::NotLibFunc: