From 6949a5ee689510a364f2f295192be7cd188e89d8 Mon Sep 17 00:00:00 2001 From: Timotej Kapus Date: Mon, 24 Jun 2019 07:49:44 -0700 Subject: [PATCH] [sledge] Add a todo for calls with inttoptr Reviewed By: ngorogiannis Differential Revision: D15965374 fbshipit-source-id: bbee029d7 --- sledge/src/llair/frontend.ml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sledge/src/llair/frontend.ml b/sledge/src/llair/frontend.ml index 9282b19fa..f521dc32b 100644 --- a/sledge/src/llair/frontend.ml +++ b/sledge/src/llair/frontend.ml @@ -913,12 +913,13 @@ let xlate_instr : let llfunc_valuekind = Llvm.classify_value maybe_llfunc in match llfunc_valuekind with | Function | Instruction _ | InlineAsm | Argument -> maybe_llfunc - | ConstantExpr -> - if Llvm.constexpr_opcode maybe_llfunc == BitCast then - Llvm.operand maybe_llfunc 0 - else + | ConstantExpr -> ( + match Llvm.constexpr_opcode maybe_llfunc with + | BitCast -> Llvm.operand maybe_llfunc 0 + | IntToPtr -> todo "maybe handle calls with inttoptr" () + | _ -> fail "Unknown value in a call instruction %a" pp_llvalue - maybe_llfunc () + maybe_llfunc () ) | _ -> fail "Unhandled operand type in a call instruction %a" pp_llvaluekind llfunc_valuekind ()