PR39241 uncovered an interesting problem with importing global variables containing blockaddress. Such variables can be imported only with function(s) referenced by blockaddress statements. As this is hard to check, I suggest simpler fix which does the following:
- Marks all GVs which contain blockaddrss statement as "not eligible to import".
- Instead of checking for dummy module in computeImportForReferencedGlobals check "not eligible to import" flag. This shouldn't break things as everything in non-thinlto module is marked as not eligible to import.