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 /powerpc | |
parent | 7fe7aabe4bac5a2250f31045797fce663ec65848 (diff) | |
download | compcert-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 'powerpc')
-rw-r--r-- | powerpc/Machregsaux.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/powerpc/Machregsaux.ml b/powerpc/Machregsaux.ml index 664f71a0..711eb623 100644 --- a/powerpc/Machregsaux.ml +++ b/powerpc/Machregsaux.ml @@ -25,7 +25,7 @@ let _ = let is_scratch_register s = s = "R0" || s = "r0" 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) |