[Ada] Use hardcoded names when converting aspects to pragmas

Pierre-Marie de Rodat derodat@adacore.com
Wed Nov 25 13:27:24 GMT 2020

Now all calls to Make_Aitem_Pragma, which converts aspects to pragmas,
use hardcoded names as the Pragma_Name parameters, because the required
value is known statically (this actually prevents code reuse, but at
least now all aspects are handled consistenttly). Other calls use Nam
constant instead of repeated calls to Chars.

Cleanup motivated by CodePeer complaining about duplicated code for
Contract_Cases and Subprogram_Variant aspects (now their code have
different hardcoded names). Semantics is unaffected.

Tested on x86_64-pc-linux-gnu, committed on trunk


	* sem_ch13.adb (Analyze_One_Aspect): Fix inconsistent calls to
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 5818 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201125/99dc67c8/attachment-0001.bin>

More information about the Gcc-patches mailing list