<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright 2012 David Malcolm <dmalcolm@redhat.com>
   Copyright 2012 Red Hat, Inc.

   This is free software: you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see
   <http://www.gnu.org/licenses/>.
-->
<api name="callgraph">
  <doc>Callgraphs</doc>

  <type name="cgraph_node" varname="node" inner="struct cgraph_node *">
    <attribute name="decl" kind="function_decl">
      <doc>The function declaration for this node within the callgraph</doc>
    </attribute>
    <iterator  name="callee" kind="cgraph_edge">
      <doc>The function calls made by this function</doc>
    </iterator>
    <iterator  name="caller" kind="cgraph_edge">
      <doc>The places that calls this function</doc>
    </iterator>
  </type>

  <type name="cgraph_edge" varname="edge" inner="struct cgraph_edge *">
    <doc>An edge within the callgraph</doc>
    <attribute name="caller" kind="cgraph_node">
      <doc>The function that makes this call</doc>
    </attribute>
    <attribute name="callee" kind="cgraph_node">
      <doc>The function that is called here</doc>
    </attribute>
    <attribute name="call_stmt" kind="gimple_call">
      <doc>The gimple call statement representing the function call</doc>
    </attribute>
  </type>

  <iterator name="cgraph_node" kind="cgraph_node">
    <doc>All callgraph nodes, for the passes where these exist</doc>
  </iterator>

</api>