[sledge] Remove `.<int>` suffix when looking up modeled function names

Summary:
It seems that functions internalized by llvm no longer have valid
mangled names, and instead have a `.<int>` suffix. This diff removes
these unpredictable suffixes when checking if a called function is a
specified/modeled intrinsic.

Reviewed By: kren1

Differential Revision: D16059781

fbshipit-source-id: a4b9f6c73
master
Josh Berdine 6 years ago committed by Facebook Github Bot
parent af8c57e07f
commit 4bbe05698e

@ -633,7 +633,11 @@ let intrinsic ~skip_throw :
result Var.pp intrinsic (List.pp ",@ " Exp.pp) (List.rev actuals)
Sh.pp pre] ;
let us = pre.us in
match (result, Var.name intrinsic, actuals) with
let name =
let n = Var.name intrinsic in
match String.index n '.' with None -> n | Some i -> String.prefix n i
in
match (result, name, actuals) with
(*
* cstdlib - memory management
*)

Loading…
Cancel
Save