Conversation
|
Thank you for the pull request. I was not aware that there should be such function (there is no documentation for it in MIR.md). Probably the prototype reflects some my intention to have this function. As for the pull request, the code is correct but not optimal. The item list can be quite long and we should use the table. I add this function implementation later. Thank you again for letting me know about the missed function. |
Yeah, I actually tried to use the table first, but found out that static htab_hash_t item_hash (MIR_item_t it, void *arg) {
return mir_hash_finish (
mir_hash_step (mir_hash_step (mir_hash_init (28), (uint64_t) MIR_item_name (NULL, it)),
(uint64_t) it->module));
}
Thanks! I'll manage until then with my implementation. |
Hi,
MIR_get_global_itemwas missing a definition, so I added it according to my best guess. That guess might be way off though, since I'm completely new to MIR. I also did not test if it works with forward definitions or re-exports.