This a follow up on: https://reviews.llvm.org/D62153
Handle the case where there are multiple object files that contain
undefined references to the same function. We only generate a function
variant if the existing symbol is directly called.
See: https://github.com/emscripten-core/emscripten/issues/8995