Update the IRGen tests for Windows IRGen. This is an improvement over
what we have currently, but is not sufficient to get all the IRGen tests
passing yet.
This was obscured due to local workarounds. Because the reference is
cross-module, and the symbol itself will be rebased, it cannot serve as
a constant initializer (the value is not known until runtime). However,
using a function pointer is permissible. The linker will materialize a
thunk for the function itself and cause the module to be force linked.
This also works on ELF and MachO as well. The overhead associated with
this is pretty minimal as the function itself has an empty body, and
flags will differentiate between a function and data symbol. The slight
penalty in size (on the order of 2-4 bytes) allows for the same pattern
to be used across all the targets.
The force load symbol was not marked as DLL export. This would result in the
symbol not being emitted into the import library and consequently not being
available to the consumer. This ensures that the symbol is visible outside of
the module.