diff options
author | Geert Bosch <bosch@gcc.gnu.org> | 2001-12-11 23:11:45 +0100 |
---|---|---|
committer | Geert Bosch <bosch@gcc.gnu.org> | 2001-12-11 23:11:45 +0100 |
commit | 980f237d115e7d58e664c063e0aade7dafd636ea (patch) | |
tree | 9a2ec6960caa6e0b10445d061c7f8838db87d84c /gcc/ada/ali.adb | |
parent | 290986ede68c7fb27f1ec54c63aa7c2398601444 (diff) | |
download | gcc-980f237d115e7d58e664c063e0aade7dafd636ea.zip gcc-980f237d115e7d58e664c063e0aade7dafd636ea.tar.gz gcc-980f237d115e7d58e664c063e0aade7dafd636ea.tar.bz2 |
einfo.ads: Minor reformatting
* einfo.ads: Minor reformatting
* exp_ch5.adb: Add comment for previous.change
* ali.adb: New interface for extended typeref stuff.
* ali.ads: New interface for typeref stuff.
* checks.adb (Apply_Alignment_Check): New procedure.
* debug.adb: Add -gnatdM for modified ALI output
* exp_pakd.adb (Known_Aligned_Enough): Replaces Known_Aligned_Enough.
* lib-xref.adb: Extend generation of <..> notation to cover
subtype/object types. Note that this is a complete rewrite,
getting rid of the very nasty quadratic algorithm previously
used for derived type output.
* lib-xref.ads: Extend description of <..> notation to cover
subtype/object types. Uses {..} for these other cases.
Also use (..) for pointer types.
* sem_util.adb (Check_Potentially_Blocking_Operation): Slight cleanup.
* exp_pakd.adb: Minor reformatting. Note that prevous RH should say:
(Known_Aligned_Enough): Replaces Must_Be_Aligned.
From-SVN: r47896
Diffstat (limited to 'gcc/ada/ali.adb')
-rw-r--r-- | gcc/ada/ali.adb | 63 |
1 files changed, 45 insertions, 18 deletions
diff --git a/gcc/ada/ali.adb b/gcc/ada/ali.adb index db6a0f2..c3c566b 100644 --- a/gcc/ada/ali.adb +++ b/gcc/ada/ali.adb @@ -133,7 +133,8 @@ package body ALI is -- If Lower is set to true then the Name_Buffer will be converted to -- all lower case. This only happends for systems where file names are -- not case sensitive, and ensures that gnatbind works correctly on - -- such systems, regardless of the case of the file name. + -- such systems, regardless of the case of the file name. Note that + -- a name can be terminated by a right typeref bracket. function Get_Nat return Nat; -- Skip blanks, then scan out an unsigned integer value in Nat range @@ -305,6 +306,7 @@ package body ALI is Name_Len := Name_Len + 1; Name_Buffer (Name_Len) := Getc; exit when At_End_Of_Field; + exit when Nextc = ')' or else Nextc = '}' or else Nextc = '>'; end loop; -- Convert file name to all lower case if file names are not case @@ -1253,30 +1255,55 @@ package body ALI is Skip_Space; - if Nextc = '<' then - P := P + 1; - N := Get_Nat; + case Nextc is + when '<' => XE.Tref := Tref_Derived; + when '(' => XE.Tref := Tref_Access; + when '{' => XE.Tref := Tref_Type; + when others => XE.Tref := Tref_None; + end case; - if Nextc = '|' then - XE.Ptype_File_Num := - Sdep_Id (N + Nat (First_Sdep_Entry) - 1); - Current_File_Num := XE.Ptype_File_Num; - P := P + 1; - N := Get_Nat; + -- Case of typeref field present + + if XE.Tref /= Tref_None then + P := P + 1; -- skip opening bracket + + if Nextc in 'a' .. 'z' then + XE.Tref_File_Num := No_Sdep_Id; + XE.Tref_Line := 0; + XE.Tref_Type := ' '; + XE.Tref_Col := 0; + XE.Tref_Standard_Entity := Get_Name; else - XE.Ptype_File_Num := Current_File_Num; + N := Get_Nat; + + if Nextc = '|' then + XE.Tref_File_Num := + Sdep_Id (N + Nat (First_Sdep_Entry) - 1); + Current_File_Num := XE.Tref_File_Num; + P := P + 1; + N := Get_Nat; + + else + XE.Tref_File_Num := Current_File_Num; + end if; + + XE.Tref_Line := N; + XE.Tref_Type := Getc; + XE.Tref_Col := Get_Nat; + XE.Tref_Standard_Entity := No_Name; end if; - XE.Ptype_Line := N; - XE.Ptype_Type := Getc; - XE.Ptype_Col := Get_Nat; + P := P + 1; -- skip closing bracket + + -- No typeref entry present else - XE.Ptype_File_Num := No_Sdep_Id; - XE.Ptype_Line := 0; - XE.Ptype_Type := ' '; - XE.Ptype_Col := 0; + XE.Tref_File_Num := No_Sdep_Id; + XE.Tref_Line := 0; + XE.Tref_Type := ' '; + XE.Tref_Col := 0; + XE.Tref_Standard_Entity := No_Name; end if; XE.First_Xref := Xref.Last + 1; |