[LLVMdev] passing parameters for a analysis pass

Trevor Harmon
Thu, 08 Jul 2010 21:05:42 -0000

On Jul 7, 2010, at 4:23 PM, Guoliang Jin wrote:

> I want to pass parameter to a analysis pass. My pass need to use some
> result from some other tools.

The getAnalysis function returns a reference to a pass. Once you have
the reference you can call the pass's member functions or access its
member variables to send/receive information.

http://llvm.org/docs/WritingAnLLVMPass.html#getAnalysis

Trevor