Commit 3810d5bf authored by yoogx's avatar yoogx
Browse files

* Refine Get_Location in case a process is bound to a virtual

          processor, subcomponent of a processor.

          For Issue #7
parent 87823391
......@@ -2449,13 +2449,17 @@ package body Ocarina.Backends.Properties is
function Get_Location (P : Node_Id) return Name_Id is
pragma Assert (AINU.Is_Processor (P) or else AINU.Is_Device (P));
if AINU.Is_Processor (P) or else AINU.Is_Device (P) then
if not Is_Defined_String_Property (P, Location) then
return No_Name;
end if;
return Get_String_Property (P, Location);
end if;
elsif AINU.Is_Virtual_Processor (P) then
return Get_Location (Parent_Component (Parent_Subcomponent (P)));
raise Program_Error;
end if;
end Get_Location;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment