Skip to content

Commit 40d6804

Browse files
committed
Remove type checks
1 parent 55e9ff6 commit 40d6804

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

llvm/lib/Analysis/TargetLibraryInfo.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,22 +1491,9 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy,
14911491
}
14921492

14931493
case LibFunc_rust_alloc:
1494-
return (NumParams == 2 && FTy.getReturnType()->isPointerTy() &&
1495-
FTy.getParamType(0)->isIntegerTy() &&
1496-
FTy.getParamType(1)->isIntegerTy());
1497-
14981494
case LibFunc_rust_dealloc:
1499-
return (NumParams == 3 && FTy.getReturnType()->isVoidTy() &&
1500-
FTy.getParamType(0)->isPointerTy() &&
1501-
FTy.getParamType(1)->isIntegerTy() &&
1502-
FTy.getParamType(2)->isIntegerTy());
1503-
15041495
case LibFunc_rust_realloc:
1505-
return (NumParams == 4 && FTy.getReturnType()->isPointerTy() &&
1506-
FTy.getParamType(0)->isPointerTy() &&
1507-
FTy.getParamType(1)->isIntegerTy() &&
1508-
FTy.getParamType(2)->isIntegerTy() &&
1509-
FTy.getParamType(3)->isIntegerTy());
1496+
return true;
15101497

15111498
case LibFunc::NumLibFuncs:
15121499
case LibFunc::NotLibFunc:

0 commit comments

Comments
 (0)