From 278872fc9bbb56885814e79becc9eb43004573a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulysse=20G=C3=A9rard?= Date: Thu, 29 Feb 2024 13:23:19 +0000 Subject: [PATCH] occurrences: use the cache, Luke ! --- src/analysis/occurrences.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/analysis/occurrences.ml b/src/analysis/occurrences.ml index be4da7cf3..78ab68047 100644 --- a/src/analysis/occurrences.ml +++ b/src/analysis/occurrences.ml @@ -35,11 +35,11 @@ let index_buffer_ ~current_buffer_path ~local_defs () = let read_unit_shape ~unit_name = log ~title:"read_unit_shape" "inspecting %s" unit_name; let cmt = Format.sprintf "%s.cmt" unit_name in - match Cmt_format.read (Load_path.find_normalized cmt) with - | _, Some cmt_infos -> + match Cmt_cache.read (Load_path.find_normalized cmt) with + | { cmt_infos = { cmt_impl_shape; _ }; _ } -> log ~title:"read_unit_shape" "shapes loaded for %s" unit_name; - cmt_infos.cmt_impl_shape - | exception _ | _ -> + cmt_impl_shape + | exception _ -> log ~title:"read_unit_shape" "failed to find %s" unit_name; None end)