Annotating resulting assembly code from an LLVM pass

Hello,

I'm working on an LLVM IR pass and would like to insert comments into the
generated .bc file during the pass. I've been having trouble finding
documentation for this process, and was wondering if there is a simple way
to do it. At the moment, I have a stringstream whose .str() I'd like to
stick in this generated file every once in a while.

Thanks,
Griffin Wright

Griffin Wright <grwright@umich.edu> writes:

I'm working on an LLVM IR pass and would like to insert comments into the
generated .bc file during the pass. I've been having trouble finding
documentation for this process, and was wondering if there is a simple way
to do it. At the moment, I have a stringstream whose .str() I'd like to
stick in this generated file every once in a while.

Metadata might do what you want.

                               -Dave