[Ada] Do not perform useless work in Check_No_Parts_Violations

Pierre-Marie de Rodat derodat@adacore.com
Wed Jun 16 08:43:55 GMT 2021


There is no need to walk the hierarchy rooted at a type that does not
come from source only to drop the result on the floor.  No functional
changes.

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

gcc/ada/

	* freeze.adb (Check_No_Parts_Violations): Return earlier if the
	type is elementary or does not come from source.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1699 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210616/04f67157/attachment-0001.bin>


More information about the Gcc-patches mailing list