summaryrefslogtreecommitdiff
path: root/translate
diff options
context:
space:
mode:
Diffstat (limited to 'translate')
-rw-r--r--translate/translation.adb10
-rw-r--r--translate/translation.ads2
2 files changed, 10 insertions, 2 deletions
diff --git a/translate/translation.adb b/translate/translation.adb
index 908d819..0d9e8bf 100644
--- a/translate/translation.adb
+++ b/translate/translation.adb
@@ -28201,12 +28201,18 @@ package body Translation is
Interfaces : O_Inter_List;
Param : O_Dnode;
begin
+ -- Create the node extension for translate.
Node_Infos.Init;
Node_Infos.Set_Last (4);
Node_Infos.Table (0 .. 4) := (others => null);
+
+ -- Force to unnest subprograms is the code generator doesn't support
+ -- nested subprograms.
+ if not Ortho_Nodes.Has_Nested_Subprograms then
+ Flag_Unnest_Subprograms := True;
+ end if;
+
New_Debug_Comment_Decl ("internal declarations, part 1");
- -- Give a name to sizetype.
- --Finish_Type_Decl (Sizetype, Get_Identifier ("__ghdl_size_t"));
-- Create well known identifiers.
Wki_This := Get_Identifier ("this");
diff --git a/translate/translation.ads b/translate/translation.ads
index bcaec62..e779685 100644
--- a/translate/translation.ads
+++ b/translate/translation.ads
@@ -77,6 +77,8 @@ package Translation is
Flag_Discard_Identifiers : Boolean := False;
-- If true, do not create nested subprograms.
+ -- This flag is forced during initialization if the code generated doesn't
+ -- support nested subprograms.
Flag_Unnest_Subprograms : Boolean := False;
type Foreign_Kind_Type is (Foreign_Unknown,