From 78d7bdb29a9256681219366422b95a39d1e02faf Mon Sep 17 00:00:00 2001 From: Luc Van Oostenryck Date: Sat, 5 Sep 2020 11:47:53 +0200 Subject: builtin: allow linearization to fail Allow the linearization of builtins to fail and continue with the normal linearization of OP_CALLs. The motivation for this is for the linearization of target specific builtins. Signed-off-by: Luc Van Oostenryck --- linearize.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/linearize.c b/linearize.c index 0d91d412..3690f2e7 100644 --- a/linearize.c +++ b/linearize.c @@ -1513,8 +1513,11 @@ static pseudo_t linearize_call_expression(struct entrypoint *ep, struct expressi fntype = fn->ctype; // handle builtins - if (fntype->op && fntype->op->linearize) - return fntype->op->linearize(ep, expr); + if (fntype->op && fntype->op->linearize) { + retval = fntype->op->linearize(ep, expr); + if (retval) + return retval; + } ctype = &fntype->ctype; if (fntype->type == SYM_NODE) -- cgit 1.2.3-korg