summaryrefslogtreecommitdiff
path: root/src/vhdl/translate/translation.adb
diff options
context:
space:
mode:
authorTristan Gingold2015-12-20 21:14:59 +0100
committerTristan Gingold2015-12-20 21:14:59 +0100
commit396eb91b6e6783cb78cb22fe0a1f26b178d695a1 (patch)
treee96f0c9dc9f337b8d9640abd4dc6ec643231165f /src/vhdl/translate/translation.adb
parent92ac42fcf39d5dac4529d939a49437b2a7afe4c2 (diff)
downloadghdl-396eb91b6e6783cb78cb22fe0a1f26b178d695a1.tar.gz
ghdl-396eb91b6e6783cb78cb22fe0a1f26b178d695a1.tar.bz2
ghdl-396eb91b6e6783cb78cb22fe0a1f26b178d695a1.zip
Do not create signal type for scalar type.
Use ghdl_signal_ptr instead. Fallout of sigptr.
Diffstat (limited to 'src/vhdl/translate/translation.adb')
-rw-r--r--src/vhdl/translate/translation.adb13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/vhdl/translate/translation.adb b/src/vhdl/translate/translation.adb
index b593f47..cfc1590 100644
--- a/src/vhdl/translate/translation.adb
+++ b/src/vhdl/translate/translation.adb
@@ -542,6 +542,13 @@ package body Translation is
Ghdl_Dir_Type_Node);
end;
+ -- Create __ghdl_signal_ptr (incomplete type).
+ New_Uncomplete_Record_Type (Ghdl_Signal_Type);
+ New_Type_Decl (Get_Identifier ("__ghdl_signal"), Ghdl_Signal_Type);
+
+ Ghdl_Signal_Ptr := New_Access_Type (Ghdl_Signal_Type);
+ New_Type_Decl (Get_Identifier ("__ghdl_signal_ptr"), Ghdl_Signal_Ptr);
+
-- Create void* __ghdl_alloc (unsigned size);
Start_Function_Decl (Interfaces, Get_Identifier ("__ghdl_alloc"),
O_Storage_External, Ghdl_Ptr_Type);
@@ -1241,12 +1248,6 @@ package body Translation is
New_Type_Decl (Get_Identifier ("__ghdl_scalar_bytes"),
Ghdl_Scalar_Bytes);
- New_Uncomplete_Record_Type (Ghdl_Signal_Type);
- New_Type_Decl (Get_Identifier ("__ghdl_signal"), Ghdl_Signal_Type);
-
- Ghdl_Signal_Ptr := New_Access_Type (Ghdl_Signal_Type);
- New_Type_Decl (Get_Identifier ("__ghdl_signal_ptr"), Ghdl_Signal_Ptr);
-
-- Type __signal_signal is record
Start_Uncomplete_Record_Type (Ghdl_Signal_Type, Rec);
New_Record_Field (Rec, Ghdl_Signal_Value_Field,