[LLVMdev] DebugInfo and Metadata Store

Devang Patel devang.patel at gmail.com
Mon Nov 30 09:45:59 PST 2009


On Thu, Nov 26, 2009 at 2:31 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Hi Devang,
>
> Before I get to the contents of this particular patch, I have a higher-level
> design question. Why is metadata stored off the LLVMContext?

Why do we have FPConstants, IntConstants etc.. in LLVMContext ? :)

> That seems like
> the wrong place to me, this data is all specific to the particular module.
> Specifically, a single MDNode may not cross modules, and if a module is
> destroyed we should eliminate all the metadata that came with it.

Metadata is not connected with a Module. Module does not own metadata.
Metadata is on the side, observing Values.

-
Devang



More information about the llvm-dev mailing list