diff options
author | gingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7> | 2006-06-16 18:41:15 +0000 |
---|---|---|
committer | gingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7> | 2006-06-16 18:41:15 +0000 |
commit | a8db752954f060217f21417bd98077a215fab971 (patch) | |
tree | d1a786459661d992376bb583423f790bb1cf8f38 /sem_decls.adb | |
parent | 549cfe1c332be3633121dfd6d29b98afc24d2650 (diff) | |
download | ghdl-a8db752954f060217f21417bd98077a215fab971.tar.gz ghdl-a8db752954f060217f21417bd98077a215fab971.tar.bz2 ghdl-a8db752954f060217f21417bd98077a215fab971.zip |
bug fixes
Diffstat (limited to 'sem_decls.adb')
-rw-r--r-- | sem_decls.adb | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/sem_decls.adb b/sem_decls.adb index a51d0faea..df5f6cf73 100644 --- a/sem_decls.adb +++ b/sem_decls.adb @@ -2156,37 +2156,6 @@ package body Sem_Decls is Set_Visible_Flag (Group, True); end Sem_Group_Declaration; - -- Return TRUE if FUNC can be a resolution function. - function Can_Be_Resolution_Function (Func : Iir_Function_Declaration) - return Boolean - is - Param : Iir; - Param_Type : Iir; - Res_Type : Iir; - begin - Param := Get_Interface_Declaration_Chain (Func); - - -- Return now if the number of parameters is not 1. - if Param = Null_Iir or else Get_Chain (Param) /= Null_Iir then - return False; - end if; - Param_Type := Get_Type (Param); - case Get_Kind (Param_Type) is - when Iir_Kind_Array_Type_Definition - | Iir_Kind_Unconstrained_Array_Subtype_Definition => - null; - when others => - return False; - end case; - Res_Type := Get_Return_Type (Func); - if Get_Base_Type (Get_Element_Subtype (Param_Type)) - /= Get_Base_Type (Res_Type) - then - return False; - end if; - return True; - end Can_Be_Resolution_Function; - -- Semantize every declaration of DECLS_PARENT. -- STMTS is the concurrent statement list associated with DECLS_PARENT -- if any, or null_iir. This is used for specification. @@ -2247,7 +2216,7 @@ package body Sem_Decls is end if; if Is_Global and then Kind = Iir_Kind_Function_Declaration - and then Can_Be_Resolution_Function (Res) + and then Is_A_Resolution_Function (Res, Null_Iir) then Set_Resolution_Function_Flag (Res, True); end if; |