aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2020-04-24 15:17:37 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2020-06-28 10:07:02 +0200
commit19aed83caebcae1103e0c4f6e200744492f17545 (patch)
tree8d15976e55751216b0af7885e508e9878d38261f /tools
parent7fe7aabe4bac5a2250f31045797fce663ec65848 (diff)
downloadcompcert-kvx-19aed83caebcae1103e0c4f6e200744492f17545.tar.gz
compcert-kvx-19aed83caebcae1103e0c4f6e200744492f17545.zip
Use Hashtbl.find_opt.
Replace the pattern `try Some (Hashtbl.find ...) with Not_found -> None` by a call to the function Hashtbl.find_opt.
Diffstat (limited to 'tools')
-rw-r--r--tools/modorder.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/modorder.ml b/tools/modorder.ml
index d1203568..7ca6a9e9 100644
--- a/tools/modorder.ml
+++ b/tools/modorder.ml
@@ -84,7 +84,7 @@ let filename_suffix s =
let emit_dependencies deps targets =
let rec dsort target suff =
- match (try Some(Hashtbl.find deps target) with Not_found -> None) with
+ match Hashtbl.find_opt deps target with
| None -> ()
| Some node ->
match node.status with