diff options
author | Mike Stump <mrs@apple.com> | 2009-09-09 15:08:12 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-09-09 15:08:12 +0000 |
commit | 1eb4433ac451dc16f4133a88af2d002ac26c58ef (patch) | |
tree | 07065b80cb7787bb7b9ffcb985196007a57e86f7 /lib/Analysis/CallGraph.cpp | |
parent | 79d39f92590cf2e91bf81486b02cd1156d13ca54 (diff) |
Remove tabs, and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CallGraph.cpp')
-rw-r--r-- | lib/Analysis/CallGraph.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Analysis/CallGraph.cpp b/lib/Analysis/CallGraph.cpp index 1e28411eb4..fdca1dc2f4 100644 --- a/lib/Analysis/CallGraph.cpp +++ b/lib/Analysis/CallGraph.cpp @@ -41,8 +41,8 @@ public: void VisitChildren(Stmt *S) { for (Stmt::child_iterator I=S->child_begin(), E=S->child_end(); I != E;++I) - if (*I) - static_cast<CGBuilder*>(this)->Visit(*I); + if (*I) + static_cast<CGBuilder*>(this)->Visit(*I); } }; } @@ -53,7 +53,7 @@ void CGBuilder::VisitCallExpr(CallExpr *CE) { CallGraphNode *CalleeNode = G.getOrInsertFunction(Ent); Decl *Parent = ASTLocation::FindImmediateParent(FD, CE); - + CallerNode->addCallee(ASTLocation(Parent, CE), CalleeNode); } } @@ -92,7 +92,7 @@ void CallGraph::addTU(ASTUnit &AST) { // Set root node to 'main' function. if (FD->getNameAsString() == "main") Root = Node; - + CGBuilder builder(*this, FD, Ent, Node); builder.Visit(FD->getBody()); } @@ -118,9 +118,9 @@ Decl *CallGraph::getDecl(CallGraphNode *Node) { void CallGraph::print(llvm::raw_ostream &os) { for (iterator I = begin(), E = end(); I != E; ++I) { if (I->second->hasCallee()) { - os << "function: " << I->first.getPrintableName() + os << "function: " << I->first.getPrintableName() << " calls:\n"; - for (CallGraphNode::iterator CI = I->second->begin(), + for (CallGraphNode::iterator CI = I->second->begin(), CE = I->second->end(); CI != CE; ++CI) { os << " " << CI->second->getName().c_str(); } @@ -139,13 +139,13 @@ void CallGraph::ViewCallGraph() const { namespace llvm { -template <> +template <> struct DOTGraphTraits<CallGraph> : public DefaultDOTGraphTraits { - static std::string getNodeLabel(const CallGraphNode *Node, + static std::string getNodeLabel(const CallGraphNode *Node, const CallGraph &CG, bool ShortNames) { return Node->getName(); - + } }; |