aboutsummaryrefslogtreecommitdiffstats
path: root/src/libraries.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-05-25 21:27:13 +0200
committerTristan Gingold <tgingold@free.fr>2019-05-25 21:27:13 +0200
commit9a1b98eeeda9e998a9e3898fb979fe874c8a15e2 (patch)
tree696a15162044618b63485300783713d77d75b677 /src/libraries.adb
parent3fafb1354ff36f3ba23e5efbde7599b1d72caf88 (diff)
downloadghdl-9a1b98eeeda9e998a9e3898fb979fe874c8a15e2.tar.gz
ghdl-9a1b98eeeda9e998a9e3898fb979fe874c8a15e2.tar.bz2
ghdl-9a1b98eeeda9e998a9e3898fb979fe874c8a15e2.zip
vhdl: move Current_Text from vhdl-utils to vhdl-parse.
Diffstat (limited to 'src/libraries.adb')
-rw-r--r--src/libraries.adb13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/libraries.adb b/src/libraries.adb
index 3ce5581f5..15b0fd3bc 100644
--- a/src/libraries.adb
+++ b/src/libraries.adb
@@ -536,9 +536,16 @@ package body Libraries is
Set_Identifier (Design_Unit, Current_Identifier);
if Get_Kind (Library_Unit) = Iir_Kind_Architecture_Body then
- Scan_Expect (Tok_Of);
- Scan_Expect (Tok_Identifier);
- Set_Entity_Name (Library_Unit, Current_Text);
+ declare
+ Ent : Iir;
+ begin
+ Scan_Expect (Tok_Of);
+ Scan_Expect (Tok_Identifier);
+ Ent := Create_Iir (Iir_Kind_Simple_Name);
+ Set_Identifier (Ent, Current_Identifier);
+ Set_Location (Ent, Get_Token_Location);
+ Set_Entity_Name (Library_Unit, Ent);
+ end;
end if;
-- Scan position.