aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/osint.adb9
-rw-r--r--gcc/ada/osint.ads3
3 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index f06663d..2824f44 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-03 Johannes Kanig <kanig@adacore.com>
+
+ * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
+ to access the first file provided on the command line.
+
2019-07-03 Ed Schonberg <schonberg@adacore.com>
* inline.adb (Process_Formals_In_Aspects): New procedure within
diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb
index 40772c3..d9d72d0 100644
--- a/gcc/ada/osint.adb
+++ b/gcc/ada/osint.adb
@@ -1422,6 +1422,15 @@ package body Osint is
return Name_Find;
end Get_Directory;
+ ------------------------------
+ -- Get_First_Main_File_Name --
+ ------------------------------
+
+ function Get_First_Main_File_Name return String is
+ begin
+ return File_Names (1).all;
+ end Get_First_Main_File_Name;
+
--------------------------
-- Get_Next_Dir_In_Path --
--------------------------
diff --git a/gcc/ada/osint.ads b/gcc/ada/osint.ads
index 048225e..dda44e7 100644
--- a/gcc/ada/osint.ads
+++ b/gcc/ada/osint.ads
@@ -511,6 +511,9 @@ package Osint is
procedure Dump_Command_Line_Source_File_Names;
-- Prints out the names of all source files on the command-line
+ function Get_First_Main_File_Name return String;
+ -- Return the file name of the first main file
+
-------------------------------------------
-- Representation of Library Information --
-------------------------------------------