diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-02-10 18:58:01 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-02-10 18:58:01 +0100 |
commit | 27835ccebbd3248dac7ed683ff242fe2a3f62af8 (patch) | |
tree | e19d56f6f650937513d1930d5220172e60bbcb78 /src | |
parent | 7a8a3743fe7e29a44ccf9068c0af7cfc68869aa7 (diff) | |
download | ghdl-27835ccebbd3248dac7ed683ff242fe2a3f62af8.tar.gz ghdl-27835ccebbd3248dac7ed683ff242fe2a3f62af8.tar.bz2 ghdl-27835ccebbd3248dac7ed683ff242fe2a3f62af8.zip |
vhdl-evaluation: minor simplification
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/vhdl-evaluation.adb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vhdl/vhdl-evaluation.adb b/src/vhdl/vhdl-evaluation.adb index 9cce658c6..cd597462c 100644 --- a/src/vhdl/vhdl-evaluation.adb +++ b/src/vhdl/vhdl-evaluation.adb @@ -55,13 +55,11 @@ package body Vhdl.Evaluation is Unit := Get_Physical_Literal (Get_Named_Entity (Get_Unit_Name (Expr))); pragma Assert (Get_Kind (Unit) = Iir_Kind_Integer_Literal); - case Kind is + case Iir_Kinds_Physical_Literal (Kind) is when Iir_Kind_Physical_Int_Literal => return Get_Value (Expr) * Get_Value (Unit); when Iir_Kind_Physical_Fp_Literal => return Int64 (Get_Fp_Value (Expr) * Fp64 (Get_Value (Unit))); - when others => - raise Program_Error; end case; when Iir_Kind_Integer_Literal => return Get_Value (Expr); |