CallGraph: Add getNode() method, constify.

llvm-svn: 152439
This commit is contained in:
Anna Zaks
2012-03-09 21:13:53 +00:00
parent 329617a80a
commit c255577062
2 changed files with 10 additions and 3 deletions

View File

@@ -136,6 +136,10 @@ void CallGraph::addToCallGraph(DeclContext *DC) {
}
}
CallGraphNode *CallGraph::getNode(const Decl *F) const {
return FunctionMap.find(F)->second;
}
CallGraphNode *CallGraph::getOrInsertFunction(Decl *F) {
CallGraphNode *&Node = FunctionMap[F];
if (Node)