diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-07-05 08:04:17 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-07-05 08:04:17 +0200 |
commit | 271edd6024b2c91c8330e4388998145b3b622601 (patch) | |
tree | 117794acdf6b33fe2520e75c5a18258a1d986003 /src/libraries.adb | |
parent | 482e59f6ec6f3ff1d92c384d1a13aafac34de648 (diff) | |
download | ghdl-271edd6024b2c91c8330e4388998145b3b622601.tar.gz ghdl-271edd6024b2c91c8330e4388998145b3b622601.tar.bz2 ghdl-271edd6024b2c91c8330e4388998145b3b622601.zip |
Add ghdl --find-top command.
Diffstat (limited to 'src/libraries.adb')
-rw-r--r-- | src/libraries.adb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libraries.adb b/src/libraries.adb index 01bf46faf..864543b36 100644 --- a/src/libraries.adb +++ b/src/libraries.adb @@ -1482,6 +1482,21 @@ package body Libraries is end case; end Find_Design_Unit; + function Find_Design_File (Lib : Iir_Library_Declaration; Name : Name_Id) + return Iir + is + File : Iir; + begin + File := Get_Design_File_Chain (Lib); + while Is_Valid (File) loop + if Get_Design_File_Filename (File) = Name then + return File; + end if; + File := Get_Chain (File); + end loop; + return Null_Iir; + end Find_Design_File; + function Is_Obsolete (Design_Unit : Iir_Design_Unit; Loc : Iir) return Boolean is |