[Ada] Do full name qualification of local exception names for LLVM
Pierre-Marie de Rodat
derodat@adacore.com
Tue Aug 13 08:33:00 GMT 2019
Exceptions declared within subprograms are associated with objects
allocated statically (at the global level), and it's helpful for the
LLVM compiler (and likely others, such as CCG) if the exception name is
fully qualified, to avoid link name clashes (gcc-based GNAT has always
"uniquified" these names). GNAT was using the simple name for local
exceptions (as for other local objects), but it now uses fully qualified
names for all exceptions.
When compiled with the command:
gcc -c -gnatG local_exception.adb | grep "local_exception__local_exc"
the following output is generated for the test further below:
local_exception__local_exc : static exception := (
local_exception__local_exc'unrestricted_access));
procedure Local_Exception is
Local_Exc : exception;
begin
null;
end Local_Exception;
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-13 Gary Dismukes <dismukes@adacore.com>
gcc/ada/
* exp_dbug.adb (Fully_Qualify_Name): Add full name qualification
for the E_Exception case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 342 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190813/4bb190ef/attachment.bin>
More information about the Gcc-patches
mailing list