diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-08-31 18:06:53 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-09-05 22:33:08 +0200 |
| commit | 448a527590b1446f7625d8b3280eb94c9a757702 (patch) | |
| tree | f34bfc9a9bc9f49e9546eb004fd5c109557c2785 | |
| parent | 0737609cbddb4f36caf6d052e4be694557567623 (diff) | |
| download | sparse-dev-448a527590b1446f7625d8b3280eb94c9a757702.tar.gz | |
use a temp var for function's upper-level statement
No functional changes, just preparing for the next patches.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
| -rw-r--r-- | linearize.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/linearize.c b/linearize.c index a56c272f..d657af82 100644 --- a/linearize.c +++ b/linearize.c @@ -2417,6 +2417,7 @@ static pseudo_t linearize_statement(struct entrypoint *ep, struct statement *stm static struct entrypoint *linearize_fn(struct symbol *sym, struct symbol *base_type) { + struct statement *stmt = base_type->stmt; struct entrypoint *ep; struct basic_block *bb; struct symbol *arg; @@ -2424,7 +2425,7 @@ static struct entrypoint *linearize_fn(struct symbol *sym, struct symbol *base_t pseudo_t result; int i; - if (!base_type->stmt) + if (!stmt) return NULL; ep = alloc_entrypoint(); @@ -2446,7 +2447,7 @@ static struct entrypoint *linearize_fn(struct symbol *sym, struct symbol *base_t linearize_argument(ep, arg, ++i); } END_FOR_EACH_PTR(arg); - result = linearize_statement(ep, base_type->stmt); + result = linearize_statement(ep, stmt); if (bb_reachable(ep->active) && !bb_terminated(ep->active)) { struct symbol *ret_type = base_type->ctype.base_type; struct instruction *insn = alloc_typed_instruction(OP_RET, ret_type); |
