[llvm-dev] Error while iterating over callee nodes in CallGraph

Doerfert, Johannes via llvm-dev llvm-dev at lists.llvm.org
Sun Dec 15 18:38:21 PST 2019

On 12/15, Niddodi, Chaitra via llvm-dev wrote:
>   for (CallGraphNode::iterator ti = cgm->begin(); ti != cgm->end(); ++ti)
>      {
>       CallGraphNode * cgn = ti->second;
>       if(cgn==NULL)
>         continue;
>       errs()<<cgn->getFunction()<<"\n";
>       errs()<<cgn->getFunction()->getName()<<"\n";

I think the function (cgn->getFunction()) can be NULL (to indicate
special edges). Make sure it isn't.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191216/d168cc76/attachment.sig>

More information about the llvm-dev mailing list