Annotate a value.


It would be very useful for my project being able to annotate
Value's. An int would do fine.

I found an old message with this same subject talking about the
Annotation interface and Annotable object, but the doxygen graphs says
that only Function is annotable.

Could I use the ValueName for the job? It would be enough, although
quite clumsy. Seems that Value's of type void can't be named (no
problem) but I'll need to name Constants, and this is not allowed.

Any suggestion, apart from modifying my LLVM sources?

I strongly suggest just using a hash table or map like DenseMap<Value*,int>. This is generally more efficiently than a separately allocated annotation object.