diff options
author | Bob Duff <duff@adacore.com> | 2016-04-18 10:53:32 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-18 12:53:32 +0200 |
commit | b269f47786ffff084e874cd09ac8d87f895a1db6 (patch) | |
tree | c8485ab31d9fcb70d60bce25c2bf64496590d01f /gcc/ada/casing.ads | |
parent | 876f16240d138e8efdb47939f906d4fcfa234fdb (diff) | |
download | gcc-b269f47786ffff084e874cd09ac8d87f895a1db6.zip gcc-b269f47786ffff084e874cd09ac8d87f895a1db6.tar.gz gcc-b269f47786ffff084e874cd09ac8d87f895a1db6.tar.bz2 |
sem_ch6.adb (Is_Inline_Pragma): The pragma argument can be a selected component...
2016-04-18 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Is_Inline_Pragma): The pragma
argument can be a selected component, which has no Chars field,
so we need to deal with that case (use the Selector_Name).
(Check_Inline_Pragma): We need to test Is_List_Member before
calling In_Same_List, because in case of a library unit, they're
not in lists, so In_Same_List fails an assertion.
2016-04-18 Bob Duff <duff@adacore.com>
* namet.ads, namet.adb: Add an Append that appends a
Bounded_String onto a Bounded_String. Probably a little more
efficient than "Append(X, +Y);". Also minor cleanup.
(Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
Append_Unqualified_Decoded): Make sure these work with non-empty
buffers.
* casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
parameter, defaulting to Global_Name_Buffer.
* errout.ads, errout.adb (Adjust_Name_Case): Pass a
Bounded_String parameter, no default.
* exp_ch11.adb (Expand_N_Raise_Statement): Use local
Bounded_String instead of Global_Name_Buffer.
* exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
to Append_Entity_Name, and pass a Bounded_String parameter,
instead of using globals.
(Add_Source_Info): Pass a Bounded_String parameter, instead of
using globals.
(Expand_Source_Info): Use local instead of globals.
* stringt.ads, stringt.adb (Append): Add an Append procedure
for appending a String_Id onto a Bounded_String.
(String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
terms of Append.
* sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
Adjust_Name_Case parameter.
* erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
Set_Casing; that's the default.
* lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
protected subprograms are entry calls; otherwise it is not possible to
distinguish them from regular subprogram calls.
From-SVN: r235129
Diffstat (limited to 'gcc/ada/casing.ads')
-rw-r--r-- | gcc/ada/casing.ads | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/gcc/ada/casing.ads b/gcc/ada/casing.ads index dec27ee..e3f7a3a 100644 --- a/gcc/ada/casing.ads +++ b/gcc/ada/casing.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,6 +29,7 @@ -- -- ------------------------------------------------------------------------------ +with Namet; use Namet; with Types; use Types; package Casing is @@ -68,14 +69,20 @@ package Casing is -- Case Control Subprograms -- ------------------------------ + procedure Set_Casing + (Buf : in out Bounded_String; + C : Casing_Type; + D : Casing_Type := Mixed_Case); + -- Takes the name stored in Buf and modifies it to be consistent with the + -- casing given by C, or if C = Unknown, then with the casing given by + -- D. The name is basically treated as an identifier, except that special + -- separator characters other than underline are permitted and treated like + -- underlines (this handles cases like minus and period in unit names, + -- apostrophes in error messages, angle brackets in names like <any_type>, + -- etc). + procedure Set_Casing (C : Casing_Type; D : Casing_Type := Mixed_Case); - -- Takes the name stored in the first Name_Len positions of Name_Buffer - -- and modifies it to be consistent with the casing given by C, or if - -- C = Unknown, then with the casing given by D. The name is basically - -- treated as an identifier, except that special separator characters - -- other than underline are permitted and treated like underlines (this - -- handles cases like minus and period in unit names, apostrophes in error - -- messages, angle brackets in names like <any_type>, etc). + -- Uses Buf => Global_Name_Buffer procedure Set_All_Upper_Case; pragma Inline (Set_All_Upper_Case); |