Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- linearize.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/linearize.h b/linearize.h index 7a3403095..a14733bd9 100644 --- a/linearize.h +++ b/linearize.h @@ -310,6 +310,22 @@ static inline void use_pseudo(struct instruction *insn, pseudo_t p, pseudo_t *pp add_pseudo_user_ptr(alloc_pseudo_user(insn, pp), &p->users); } +static inline struct symbol *pseudo_type(pseudo_t pseudo) +{ + switch (pseudo->type) { + case PSEUDO_SYM: + case PSEUDO_ARG: + case PSEUDO_VAL: + return pseudo->sym; + case PSEUDO_REG: + case PSEUDO_PHI: + return pseudo->def->type; + case PSEUDO_VOID: + default: + return &void_ctype; + } +} + static inline void remove_bb_from_list(struct basic_block_list **list, struct basic_block *entry, int count) { delete_ptr_list_entry((struct ptr_list **)list, entry, count); -- 2.11.1 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html