diff --git a/infer/src/llvm/lParser.mly b/infer/src/llvm/lParser.mly index e7d28ca67..9adb9fb38 100644 --- a/infer/src/llvm/lParser.mly +++ b/infer/src/llvm/lParser.mly @@ -302,8 +302,6 @@ fast_math_flags: binop_args: | typ operand COMMA operand { () } -(* below is fuzzy *) - operand: | var = variable { Var var } | const = constant { Const const } diff --git a/infer/src/llvm/lTrans.ml b/infer/src/llvm/lTrans.ml index 6c08623f6..174bf6fbb 100644 --- a/infer/src/llvm/lTrans.ml +++ b/infer/src/llvm/lTrans.ml @@ -78,15 +78,15 @@ let rec trans_annotated_instructions let new_sil_instr = Sil.Set (trans_variable var, trans_typ tp, trans_operand op, location) in (new_sil_instr :: sil_instrs, locals) - | Alloc (var, tp, num_elems) -> - (* num_elems currently ignored *) - begin match var with - | Global (Name var_name) | Local (Name var_name) -> - let new_local = (Mangled.from_string var_name, trans_typ (Tptr tp)) in - (sil_instrs, new_local :: locals) - | _ -> raise (ImproperTypeError "Not expecting alloca instruction to a numbered variable.") - end - | _ -> raise (Unimplemented "Need to translate instruction to SIL.") + | Alloc (var, tp, num_elems) -> + (* num_elems currently ignored *) + begin match var with + | Global (Name var_name) | Local (Name var_name) -> + let new_local = (Mangled.from_string var_name, trans_typ (Tptr tp)) in + (sil_instrs, new_local :: locals) + | _ -> raise (ImproperTypeError "Not expecting alloca instruction to a numbered variable.") + end + | _ -> raise (Unimplemented "Need to translate instruction to SIL.") end (* Update CFG and call graph with new function definition *)