aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/iirs_utils.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-06-02 20:26:09 +0200
committerTristan Gingold <tgingold@free.fr>2016-06-02 20:26:09 +0200
commit9f3567a554b78b200ea91cb66e5945a80fd0ceb3 (patch)
treef5e8c42809ee3c534ae920a33d7152631cefee9f /src/vhdl/iirs_utils.adb
parent39d035c3673f513c54e6fe57cd42e2b88d0d68ff (diff)
downloadghdl-9f3567a554b78b200ea91cb66e5945a80fd0ceb3.tar.gz
ghdl-9f3567a554b78b200ea91cb66e5945a80fd0ceb3.tar.bz2
ghdl-9f3567a554b78b200ea91cb66e5945a80fd0ceb3.zip
Handle default parameters for file_open.
Display backtrace for error in file_open.
Diffstat (limited to 'src/vhdl/iirs_utils.adb')
-rw-r--r--src/vhdl/iirs_utils.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vhdl/iirs_utils.adb b/src/vhdl/iirs_utils.adb
index e5e9a5acf..14dc0a2c4 100644
--- a/src/vhdl/iirs_utils.adb
+++ b/src/vhdl/iirs_utils.adb
@@ -1187,6 +1187,18 @@ package body Iirs_Utils is
end case;
end Get_Method_Type;
+ function Get_Actual_Or_Default (Assoc : Iir) return Iir is
+ begin
+ case Get_Kind (Assoc) is
+ when Iir_Kind_Association_Element_By_Expression =>
+ return Get_Actual (Assoc);
+ when Iir_Kind_Association_Element_Open =>
+ return Get_Default_Value (Get_Formal (Assoc));
+ when others =>
+ Error_Kind ("get_actual_or_default", Assoc);
+ end case;
+ end Get_Actual_Or_Default;
+
function Create_Error (Orig : Iir) return Iir
is
Res : Iir;