aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CallGraph.cpp
AgeCommit message (Collapse)Author
2009-11-14Change *BugReport constructors to take StringRefs.Benjamin Kramer
- Eliminates many calls to std::string.c_str() - Fixes an invalid read in ReturnStackAddressChecker due to an unsafe call to StringRef.data() which doesn't guarantee null-termination. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88779 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-28make CallGraph more flexible by letting it accept ASTContext instead of ASTUnit.Zhongxing Xu
Patch by Simone Pellegrini. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85386 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:Argyrios Kyrtzidis
-A NamedDecl reference -A TypeLoc git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83095 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29Add more const-goodness to ASTLocation.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24Add getDecl() to CallGraph and CallGraphNode.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76940 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23Add two nodes to the call graph:Zhongxing Xu
- Root is the main function or 0. - ExternalCallingNode has edges to all external functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76876 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23Add template specializations to view the call graph in dot format.Zhongxing Xu
- change the DenseMap used in callgraph to std::map, since DenseMap cannot be used with mapped_iterator and friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76874 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21Remove the ASTContext parameter from Entity::getPrintableName().Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76546 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21Change the semantics for Entity.Argyrios Kyrtzidis
Entity can now refer to declarations that are not visible outside the translation unit. It is a wrapper of a pointer union, it's either a Decl* for declarations that don't "cross" translation units, or an EntityImpl* which is associated with the specific "visible" Decl. Included is a test case for handling fields across translation units. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76515 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Replace stmt visitors with the fall back method.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Rename Entity::getName() to Entity::getPrintableName() to make its purposeZhongxing Xu
more obvious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76167 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17As suggested by Argyrios, revert r76159 and make "FindImmediateParent" Zhongxing Xu
a public static method of ASTLocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76166 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Refactor code into a new CallExpr::getDirectCallee() method. Simplify someZhongxing Xu
code with the new method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76164 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17CallGraph: add a bunch of stmt visitors.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76161 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17CallGraph:Zhongxing Xu
- add IfStmt visitor. - print information only when a function has callee. Otherwise its ASTContext map is NULL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76156 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16Commit the initial implementation of call graph building.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75873 91177308-0d34-0410-b5e6-96231b3b80d8