@@ -1491,10 +1491,9 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy,
1491
1491
}
1492
1492
1493
1493
case LibFunc_rust_alloc:
1494
- return (NumParams == 3 && FTy.getReturnType ()->isPointerTy () &&
1494
+ return (NumParams == 2 && FTy.getReturnType ()->isPointerTy () &&
1495
1495
FTy.getParamType (0 )->isIntegerTy () &&
1496
- FTy.getParamType (1 )->isIntegerTy () &&
1497
- FTy.getParamType (2 )->isPointerTy ());
1496
+ FTy.getParamType (1 )->isIntegerTy ());
1498
1497
1499
1498
case LibFunc_rust_dealloc:
1500
1499
return (NumParams == 3 && FTy.getReturnType ()->isVoidTy () &&
@@ -1503,13 +1502,11 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy,
1503
1502
FTy.getParamType (2 )->isIntegerTy ());
1504
1503
1505
1504
case LibFunc_rust_realloc:
1506
- return (NumParams == 6 && FTy.getReturnType ()->isPointerTy () &&
1505
+ return (NumParams == 4 && FTy.getReturnType ()->isPointerTy () &&
1507
1506
FTy.getParamType (0 )->isPointerTy () &&
1508
1507
FTy.getParamType (1 )->isIntegerTy () &&
1509
1508
FTy.getParamType (2 )->isIntegerTy () &&
1510
- FTy.getParamType (3 )->isIntegerTy () &&
1511
- FTy.getParamType (4 )->isIntegerTy () &&
1512
- FTy.getParamType (5 )->isPointerTy ());
1509
+ FTy.getParamType (3 )->isIntegerTy ());
1513
1510
1514
1511
case LibFunc::NumLibFuncs:
1515
1512
case LibFunc::NotLibFunc:
0 commit comments