LLVM Discussion Forums

Where (in what pass) is a comdat object inserted?

Hi – I’m trying to determine the rules for specifying that an object be placed in a comdat section.

In the documentation, I can find the comdat object and some explanation of its purpose, but I cannot find documentation on the rules or the pass that inserts the comdat object into, for example, the Function object.

I’m laboriously grep’ing through the code to find this information, both where and, if the comments are useful, how/when/why the comdat object is inserted.

I’d appreciate someone in the community short-circuiting my search with the information, and failing that, I’ll post here again if/when I come across it.

Thanks very much!