This allows LLD to print the name for an InputGlobal when encountering an error.
NB. This PR specifies globals in the "name" section - but I don't think we need that now, and it's not "official" yet anyway: https://github.com/WebAssembly/design/pull/1064
I'd rather not use auto unless the type is already present on the same line (i.e. when using dyn_cast).