mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 03:55:04 -05:00
fix(compiler): Handle size_t explicitly in JITLambdaArgumentAdaptor::addArgument
On some systems, size_t does not alias any of the fixed-size, unsigned integer types and therefore needs to be treated explicitly in `JITLambdaArgumentAdaptor::addArgument` to prevent the function from failing with an unknown argument type. Closes issue #369: Bug: MacOS tests failing on master due to IntLambdaArgument<size_t>.
This commit is contained in:
@@ -199,9 +199,12 @@ public:
|
||||
// to `jla` failed.
|
||||
static inline llvm::Error addArgument(JITLambda::Argument &jla, size_t pos,
|
||||
const LambdaArgument &arg) {
|
||||
// Try the supported integer types; size_t needs explicit
|
||||
// treatment, since it may alias none of the fixed size integer
|
||||
// types
|
||||
llvm::Expected<bool> successOrError =
|
||||
JITLambdaArgumentAdaptor::tryAddArg<uint64_t, uint32_t, uint16_t,
|
||||
uint8_t>(jla, pos, arg);
|
||||
uint8_t, size_t>(jla, pos, arg);
|
||||
|
||||
if (!successOrError)
|
||||
return std::move(successOrError.takeError());
|
||||
|
||||
Reference in New Issue
Block a user