diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-09-05 11:47:53 +0200 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-09-07 00:57:44 +0200 |
commit | 78d7bdb29a9256681219366422b95a39d1e02faf (patch) | |
tree | c351435fb24cb88d021313d0d05784bfddf2587c | |
parent | 9937d33bf9454de48d852d69d90fe05f966f8026 (diff) | |
download | sparse-78d7bdb29a9256681219366422b95a39d1e02faf.tar.gz |
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 <luc.vanoostenryck@gmail.com>
-rw-r--r-- | linearize.c | 7 |
1 files 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) |