//===- CallGraph.cpp - Build a Module's call graph ------------------------===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This file implements the CallGraph class.
Root = Node; // Found a main, keep track of it!
}
}
-
+
// If this function is not defined in this translation unit, it could call
// anything.
if (F->isExternal() && !F->getIntrinsicID())
// If we didn't find a main function, use the external call graph node
if (Root == 0) Root = ExternalCallingNode;
-
+
return false;
}
OS << F->getName() << "\n";
else
OS << "<<null function: 0x" << getRoot() << ">>\n";
-
+
for (CallGraph::const_iterator I = begin(), E = end(); I != E; ++I)
I->second->print(OS);
}