[LLVMdev] attach metadata to argument/basicblock/function

Chris Lattner clattner at apple.com
Wed Dec 30 17:02:28 PST 2009


On Dec 22, 2009, at 1:40 AM, ether zhhb wrote:

> hi all,
> 
> i have a pass that wants to attach metadata to argument for later
> optimization pass, but i found that MetadataConext only have a method
> "void addMD(unsigned Kind, MDNode *Node, Instruction *Inst);", so,
> attaching metadata to LLVM Values other rather than Instruction is not
> support yet?

Correct, you can only attach metadata to instructions currently.

-Chris



More information about the llvm-dev mailing list