Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
866a2e9f
Commit
866a2e9f
authored
Aug 09, 2013
by
yoogx
Browse files
* Defends against empty destination list
parent
b8bc1a4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/backends/ocarina-backends-cheddar-mapping.adb
View file @
866a2e9f
...
...
@@ -684,22 +684,27 @@ package body Ocarina.Backends.Cheddar.Mapping is
K
:=
Make_Defining_Identifier
(
Fully_Qualified_Instance_Name
(
E
));
Append_Node_To_List
(
K
,
XTN
.
Subitems
(
N
));
else
Append_Node_To_List
(
Make_Assignement
(
Make_Defining_Identifier
(
Get_String_Name
(
"to_type"
)),
Make_Defining_Identifier
(
Get_String_Name
(
"buffer"
))),
XTN
.
Items
(
N
));
K
:=
Make_Defining_Identifier
(
Fully_Qualified_Instance_Name
(
E
));
Append_Node_To_List
(
K
,
XTN
.
Subitems
(
N
));
K
:=
Make_Defining_Identifier
(
Map_Buffer_Name
(
Parent_Component
(
Item
(
AIN
.
First_Node
(
Get_Destination_Ports
(
P
)))),
Item
(
AIN
.
First_Node
(
Get_Destination_Ports
(
P
)))));
Append_Node_To_List
(
K
,
XTN
.
Subitems
(
N
));
else
if
Present
(
AIN
.
First_Node
(
Get_Destination_Ports
(
P
)))
then
-- We have to defends against the destination being an empty list.
Append_Node_To_List
(
Make_Assignement
(
Make_Defining_Identifier
(
Get_String_Name
(
"to_type"
)),
Make_Defining_Identifier
(
Get_String_Name
(
"buffer"
))),
XTN
.
Items
(
N
));
K
:=
Make_Defining_Identifier
(
Fully_Qualified_Instance_Name
(
E
));
Append_Node_To_List
(
K
,
XTN
.
Subitems
(
N
));
K
:=
Make_Defining_Identifier
(
Map_Buffer_Name
(
Parent_Component
(
Item
(
AIN
.
First_Node
(
Get_Destination_Ports
(
P
)))),
Item
(
AIN
.
First_Node
(
Get_Destination_Ports
(
P
)))));
Append_Node_To_List
(
K
,
XTN
.
Subitems
(
N
));
end
if
;
end
if
;
return
N
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment