Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- sparse-llvm.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/sparse-llvm.c b/sparse-llvm.c index 31411d9d1..4e4fb2ea5 100644 --- a/sparse-llvm.c +++ b/sparse-llvm.c @@ -270,31 +270,26 @@ static LLVMLinkage function_linkage(struct symbol *sym) #define MAX_PSEUDO_NAME 64 -static void pseudo_name(pseudo_t pseudo, char *buf) +static const char *pseudo_name(pseudo_t pseudo, char *buf) { switch (pseudo->type) { case PSEUDO_REG: snprintf(buf, MAX_PSEUDO_NAME, "R%d", pseudo->nr); break; - case PSEUDO_SYM: - assert(0); - break; - case PSEUDO_VAL: - assert(0); - break; - case PSEUDO_ARG: { - assert(0); - break; - } case PSEUDO_PHI: snprintf(buf, MAX_PSEUDO_NAME, "PHI%d", pseudo->nr); break; + case PSEUDO_SYM: + case PSEUDO_VAL: + case PSEUDO_ARG: case PSEUDO_VOID: buf[0] = '\0'; break; default: assert(0); } + + return buf; } static LLVMValueRef get_sym_value(struct function *fn, struct symbol *sym) -- 2.12.0 -- 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