[LLVMdev] Adding comments to generated IR
Duncan Sands
baldrick at free.fr
Thu Nov 1 01:16:29 PDT 2012
Hi edA-qa mort-ora-y,
On 01/11/12 09:03, edA-qa mort-ora-y wrote:
> I'm using createPrintModulePass to produce the IR of a created Module.
> I'm wondering if there is some way to insert/attach comments to the
> generated output. That is, prior to a given command, or block, emit a
> comment.
>
> I see the ability to add meta/debug data. Could that somehow be used to
> get comments into the generated IR? Or is there some other mechanism?
>
> I want to do this to help me diagnose problems in the IR that I am
> generating.
check out AssemblyAnnotationWriter.h
Ciao, Duncan.
More information about the llvm-dev
mailing list