On Mon, Mar 20, 2017 at 5:15 PM, Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote: > --- a/sparse-llvm.c > +++ b/sparse-llvm.c > @@ -866,6 +866,23 @@ static void output_op_cast(struct function *fn, struct instruction *insn, LLVMOp > insn->target->priv = target; > } > > +static void output_op_setval(struct function *fn, struct instruction *insn) > +{ > + struct expression *val = insn->val; > + LLVMTypeRef dtype = symbol_type(insn->type); > + LLVMValueRef target; > + > + switch (val->type) { > + case EXPR_FVALUE: > + target = LLVMConstReal(dtype, val->fvalue); > + break; > + default: > + assert(0); If there is just one case and default, maybe "if" statement is good enough? Switch statement is kind of over kill here. Chris -- 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