[LLVMdev] Attaching metadata to / extending BasicBlock class

Paweł Bylica chfast at gmail.com
Tue Jun 30 13:39:35 PDT 2015


Hi,

Is there any way to attach some extended data to an instance of IR
BasicBlock class? I tried to extend the class by inheritance but had some
problems around destructor (?). Looks like the module is the owner of basic
blocks but it does not expect it to be extended.

The best idea I have is to attach IR Metadata to the first instructions of
the basic block. That is however quite restrictive as the construction an
instance of a metadata node is unnecessary complex for this case.

- PB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150630/a6ac1ea9/attachment.html>


More information about the llvm-dev mailing list