diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2020-04-24 15:17:37 +0200 |
---|---|---|
committer | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2020-06-28 10:07:02 +0200 |
commit | 19aed83caebcae1103e0c4f6e200744492f17545 (patch) | |
tree | 8d15976e55751216b0af7885e508e9878d38261f /x86 | |
parent | 7fe7aabe4bac5a2250f31045797fce663ec65848 (diff) | |
download | compcert-19aed83caebcae1103e0c4f6e200744492f17545.tar.gz compcert-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 'x86')
-rw-r--r-- | x86/Machregsaux.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/x86/Machregsaux.ml b/x86/Machregsaux.ml index 473e0602..82d3803e 100644 --- a/x86/Machregsaux.ml +++ b/x86/Machregsaux.ml @@ -25,7 +25,7 @@ let _ = let is_scratch_register r = false let name_of_register r = - try Some (Hashtbl.find register_names r) with Not_found -> None + Hashtbl.find_opt register_names r let register_by_name s = Machregs.register_by_name (coqstring_uppercase_ascii_of_camlstring s) |