Create the indirect function table based on symbols rather
than just duplicating the input entries. This has the
effect of de-duplicating the table.
This is a followup to the equivalent change made for globals:
https://reviews.llvm.org/D40859
Parially based on a patch by Nicholas Wilson:
https://reviews.llvm.org/D40845
Forgot to mention in previous review threads, but we have ArrayRef class, and we usually use that class instead of const std::vector<T> &. You don't need to update it in this patch, but do you mind if I ask you update it in a follow-up patch?