[LLVMdev] Use Callgraph

Haopeng Liu hyliuhp at gmail.com
Mon Jun 8 15:32:37 PDT 2015


Oh, you're right. Thank you.

Another question: Given two CallGraphNodes (caller and callee) in 
CallGraph, How to map the edge in CallGraph to CallInst?

Best,
Haopeng

On 6/8/15 11:02 AM, Gordon Keiser wrote:
> I believe you want to use CallGraphWrapperPass for this, as CallGraph itself isn't a pass.  Correct me if I'm wrong.
>
>
> Gordon Keiser
> Software Development Engineer
> Arxan Technologies
>
>
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Haopeng Liu
> Sent: Sunday, June 07, 2015 10:03 PM
> To: LLVM Developers Mailing List
> Subject: [LLVMdev] Use Callgraph
>
> Hi All,
>
> I tried to use CallGraph in llvm by adding "AU.addRequired<CallGraph>();" in getAnalysisUsage function.
>
> But it reports an error:
>
> include/llvm/PassAnalysisSupport.h:56:39: error: ‘ID’ is not a member of ‘llvm::CallGraph’
>        return addRequiredID(PassClass::ID);
>
> How to use it correctly?
>
> Thanks,
> Haopeng
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list