diff options
author | gingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7> | 2006-08-06 06:45:40 +0000 |
---|---|---|
committer | gingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7> | 2006-08-06 06:45:40 +0000 |
commit | 63925c8de8d3171e6b258796e4d167524691490a (patch) | |
tree | a8e7971f5889da0b7bba2cd7f9624c704d0145df /translate/translation.ads | |
parent | 3841c37a946481815c89928ccd15b71b608aa526 (diff) | |
download | ghdl-63925c8de8d3171e6b258796e4d167524691490a.tar.gz ghdl-63925c8de8d3171e6b258796e4d167524691490a.tar.bz2 ghdl-63925c8de8d3171e6b258796e4d167524691490a.zip |
bugs fixed
Diffstat (limited to 'translate/translation.ads')
-rw-r--r-- | translate/translation.ads | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/translate/translation.ads b/translate/translation.ads index 2b885a8da..55af06967 100644 --- a/translate/translation.ads +++ b/translate/translation.ads @@ -17,8 +17,6 @@ -- 02111-1307, USA. with Iirs; use Iirs; with Ortho_Nodes; -with Ortho_Ident; use Ortho_Ident; -with Types; use Types; package Translation is -- Initialize the package: create internal nodes. @@ -69,20 +67,21 @@ package Translation is type Foreign_Info_Type (Kind : Foreign_Kind_Type := Foreign_Unknown) is record - Subprg : O_Ident; - case Kind is when Foreign_Unknown => null; when Foreign_Vhpidirect => - Lib : Name_Id; + -- Positions in name_table.name_buffer. + Lib_First : Natural; + Lib_Last : Natural; + Subprg_First : Natural; + Subprg_Last : Natural; when Foreign_Intrinsic => null; end case; end record; - Foreign_Bad : constant Foreign_Info_Type := (Kind => Foreign_Unknown, - Subprg => O_Ident_Nul); + Foreign_Bad : constant Foreign_Info_Type := (Kind => Foreign_Unknown); -- Return a foreign_info for DECL. -- Can generate error messages, if the attribute expression is ill-formed. @@ -90,7 +89,12 @@ package Translation is -- Otherwise, only KIND discriminent is set. -- EXTRACT_NAME should be set only inside translation itself, since the -- name can be based on the prefix. - function Translate_Foreign_Id (Decl : Iir; Extract_Name : Boolean) - return Foreign_Info_Type; - + function Translate_Foreign_Id (Decl : Iir) return Foreign_Info_Type; + + -- If not null, this procedure is called when a foreign subprogram is + -- created. + type Foreign_Hook_Access is access procedure (Decl : Iir; + Info : Foreign_Info_Type; + Ortho : Ortho_Nodes.O_Dnode); + Foreign_Hook : Foreign_Hook_Access := null; end Translation; |