[cfe-dev] Attaching Metadata to BasicBlocks

Chris Lattner clattner at apple.com
Thu Apr 22 09:44:54 PDT 2010


On Apr 22, 2010, at 2:29 AM, kalyan ponnala wrote:

> 
> Hello,
> 
> I was researching how Metadata in LLVM 2.7 is represented and used and I found that Metadata can be attached and manipulated at both the module level and instruction levels.  Upon inspecting the Metadata classes, I also saw that there is an enum that contains a bit for "FunctionLocalBit" on the MDNode. 
> 
> Unfortunately, I did not see any methods to attach or manipulate Metadata at the BasicBlock level or Function levels in the LLVM IR classes.
> 
> Can someone please tell me why there is no support for attaching and manipulating Metadata to BasicBlocks and Functions?

Just because no one has needed it yet.  I'm not opposed to it being added it if you have a compelling client for it.

-Chris



More information about the cfe-dev mailing list