From 83c593362bce5d1930a1bbf486a62a06c674bded Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 5 May 2019 08:26:38 +0200 Subject: vhdl: move back_end to vhdl child. --- src/vhdl/back_end.ads | 34 ---------------------------------- src/vhdl/translate/trans_be.adb | 8 ++++---- src/vhdl/vhdl-back_end.ads | 34 ++++++++++++++++++++++++++++++++++ src/vhdl/vhdl-sem_specs.adb | 4 ++-- 4 files changed, 40 insertions(+), 40 deletions(-) delete mode 100644 src/vhdl/back_end.ads create mode 100644 src/vhdl/vhdl-back_end.ads (limited to 'src/vhdl') diff --git a/src/vhdl/back_end.ads b/src/vhdl/back_end.ads deleted file mode 100644 index 00ac5c429..000000000 --- a/src/vhdl/back_end.ads +++ /dev/null @@ -1,34 +0,0 @@ --- Back-end specialization --- Copyright (C) 2002, 2003, 2004, 2005 Tristan Gingold --- --- GHDL is free software; you can redistribute it and/or modify it under --- the terms of the GNU General Public License as published by the Free --- Software Foundation; either version 2, or (at your option) any later --- version. --- --- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or --- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --- for more details. --- --- You should have received a copy of the GNU General Public License --- along with GHDL; see the file COPYING. If not, write to the Free --- Software Foundation, 59 Temple Place - Suite 330, Boston, MA --- 02111-1307, USA. -with Iirs; use Iirs; - -package Back_End is - -- Back-end options. - type Parse_Option_Acc is access function (Opt : String) return Boolean; - Parse_Option : Parse_Option_Acc := null; - - -- Disp back-end option help. - type Disp_Option_Acc is access procedure; - Disp_Option : Disp_Option_Acc := null; - - -- DECL is an architecture (library unit) or a subprogram (specification) - -- decorated with a FOREIGN attribute. Do back-end checks. - -- May be NULL for no additionnal checks. - type Sem_Foreign_Acc is access procedure (Decl : Iir); - Sem_Foreign : Sem_Foreign_Acc := null; -end Back_End; diff --git a/src/vhdl/translate/trans_be.adb b/src/vhdl/translate/trans_be.adb index e3f8e20da..af76725d1 100644 --- a/src/vhdl/translate/trans_be.adb +++ b/src/vhdl/translate/trans_be.adb @@ -17,7 +17,7 @@ -- 02111-1307, USA. with Errorout; use Errorout; with Ada.Text_IO; -with Back_End; +with Vhdl.Back_End; package body Trans_Be is procedure Sem_Foreign (Decl : Iir) @@ -69,8 +69,8 @@ package body Trans_Be is procedure Register_Translation_Back_End is begin - Back_End.Sem_Foreign := Sem_Foreign'Access; - Back_End.Parse_Option := Parse_Option'Access; - Back_End.Disp_Option := Disp_Option'Access; + Vhdl.Back_End.Sem_Foreign := Sem_Foreign'Access; + Vhdl.Back_End.Parse_Option := Parse_Option'Access; + Vhdl.Back_End.Disp_Option := Disp_Option'Access; end Register_Translation_Back_End; end Trans_Be; diff --git a/src/vhdl/vhdl-back_end.ads b/src/vhdl/vhdl-back_end.ads new file mode 100644 index 000000000..ea62ae80b --- /dev/null +++ b/src/vhdl/vhdl-back_end.ads @@ -0,0 +1,34 @@ +-- Back-end specialization +-- Copyright (C) 2002, 2003, 2004, 2005 Tristan Gingold +-- +-- GHDL is free software; you can redistribute it and/or modify it under +-- the terms of the GNU General Public License as published by the Free +-- Software Foundation; either version 2, or (at your option) any later +-- version. +-- +-- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or +-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +-- for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with GHDL; see the file COPYING. If not, write to the Free +-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA +-- 02111-1307, USA. +with Iirs; use Iirs; + +package Vhdl.Back_End is + -- Back-end options. + type Parse_Option_Acc is access function (Opt : String) return Boolean; + Parse_Option : Parse_Option_Acc := null; + + -- Disp back-end option help. + type Disp_Option_Acc is access procedure; + Disp_Option : Disp_Option_Acc := null; + + -- DECL is an architecture (library unit) or a subprogram (specification) + -- decorated with a FOREIGN attribute. Do back-end checks. + -- May be NULL for no additionnal checks. + type Sem_Foreign_Acc is access procedure (Decl : Iir); + Sem_Foreign : Sem_Foreign_Acc := null; +end Vhdl.Back_End; diff --git a/src/vhdl/vhdl-sem_specs.adb b/src/vhdl/vhdl-sem_specs.adb index ed56ade37..aa535017a 100644 --- a/src/vhdl/vhdl-sem_specs.adb +++ b/src/vhdl/vhdl-sem_specs.adb @@ -31,7 +31,7 @@ with Flags; use Flags; with Std_Names; with Vhdl.Sem_Decls; with Xrefs; use Xrefs; -with Back_End; +with Vhdl.Back_End; package body Vhdl.Sem_Specs is function Get_Entity_Class_Kind (Decl : Iir) return Vhdl.Tokens.Token_Type @@ -354,7 +354,7 @@ package body Vhdl.Sem_Specs is end if; declare - use Back_End; + use Vhdl.Back_End; begin if Sem_Foreign /= null then Sem_Foreign.all (Decl); -- cgit v1.2.3