compiler: encode user visible names if necessary

Avoid putting weird characters into the user visible name.
It breaks stabs in particular, and may also cause debugger problems.
Instead, encode those names, and use a "g." prefix to tell the debugger.

Also dereference the type for the name of a recover thunk, to avoid a
pointless '*' that gets encoded.

Change-Id: Ie469be9b25806b220107eae4981a3d9a4a92bade
Trust: Ian Lance Taylor <>
Reviewed-by: Cherry Zhang <>
4 files changed