[LLVMdev] [Patch] Metadata nodes and C API

David Peixotto dpeixott at codeaurora.org
Wed Sep 12 10:05:22 PDT 2012

Hi Anthony,

You need to send patches to the llvm-commits mailing list to get them
reviewed and committed.


-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
by The Linux Foundation

> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Anthony Bryant
> Sent: Wednesday, September 12, 2012 8:53 AM
> To: llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] [Patch] Metadata nodes and C API
> On 4 September 2012 13:44, Anthony Bryant <antjbryant at gmail.com>
> wrote:
> > Hi,
> >
> > I'm relatively new to using LLVM, and I'm working on a front end for a
> > language I'm designing. I have a couple of questions about metadata:
> >
> > 1. I'd like to be able to store some high level program structure in
> > bitcode files, to be imported by future runs of my compiler, in order
> > to keep everything in one place (so my bitcode files become something
> > akin to Java's class files). I was thinking of using named metadata to
> > store that structure. I read in an old blog post that "use of metadata
> > is only safe if the program retains its semantics when the metadata is
> > silently dropped". Since it doesn't change the actual function of any
> > of the code (and the metadata nodes don't reference the code at all),
> > would this be a safe/practical way to store that high level structure
> > in the long term?
> >
> > 2. I couldn't find any way to extract data from (non-named) metadata
> > nodes from the C API. Is the attached patch an acceptable way to add
> > that functionality? If so, could someone commit it?
> >
> > Thanks,
> > Anthony Bryant.
> Could someone take a look at this patch please? It only adds a couple of
> functions to the C bindings.
> Thanks,
> Anthony Bryant.

More information about the llvm-dev mailing list