diff options
Diffstat (limited to 'src/CfimAstUtils.ml')
-rw-r--r-- | src/CfimAstUtils.ml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/CfimAstUtils.ml b/src/CfimAstUtils.ml index ae6665d4..902156f2 100644 --- a/src/CfimAstUtils.ml +++ b/src/CfimAstUtils.ml @@ -29,6 +29,16 @@ let lookup_fun_sig (fun_id : fun_id) (fun_defs : fun_def FunDefId.Map.t) : in sg +let lookup_fun_name (fun_id : fun_id) (fun_defs : fun_def FunDefId.Map.t) : + Identifiers.name = + match fun_id with + | Local id -> (FunDefId.Map.find id fun_defs).name + | Assumed aid -> + let _, sg = + List.find (fun (aid', _) -> aid = aid') Assumed.assumed_names + in + sg + (** Small utility: list the transitive parents of a region var group. We don't do that in an efficient manner, but it doesn't matter. |