Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- sparse-llvm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sparse-llvm.c b/sparse-llvm.c index 0b711473d..ac0093a3b 100644 --- a/sparse-llvm.c +++ b/sparse-llvm.c @@ -876,13 +876,12 @@ static void output_op_ptrcast(struct function *fn, struct instruction *insn) { LLVMValueRef src, target; LLVMTypeRef dtype; + struct symbol *otype = insn->orig_type; LLVMOpcode op; char target_name[64]; - src = insn->src->priv; - if (!src) - src = pseudo_to_value(fn, insn->type, insn->src); + src = get_operand(fn, otype, insn->src); pseudo_name(insn->target, target_name); assert(!is_float_type(insn->type)); @@ -907,16 +906,15 @@ static void output_op_cast(struct function *fn, struct instruction *insn, LLVMOp { LLVMValueRef src, target; LLVMTypeRef dtype; + struct symbol *otype = insn->orig_type; char target_name[64]; unsigned int width; if (is_ptr_type(insn->type)) // cast to void* is OP_CAST ... return output_op_ptrcast(fn, insn); - src = insn->src->priv; - if (!src) - src = pseudo_to_value(fn, insn->type, insn->src); + src = get_operand(fn, otype, insn->src); pseudo_name(insn->target, target_name); assert(!is_float_type(insn->type)); -- 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