The function import logic during the thin link currently has handling
for the fact that we will currently import constant unnamed_addr global
variables in the backend. It will conservatively mark all values
referenced in the initializer lists of exported global variables as also
exported.
However, this only handled values referenced directly from the
initializer list of an exported global variable. If the value is itself
a constant unnamed_addr variable, we could end up exporting its
references as well. Therefore, do this by invoking exportGlobalInModule
recursively, instead of just adding the first level of initializer list
references to the ExportList directly.
Fixes PR31052.