summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ParentMap.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-11-15 20:54:24 +0000
committerTed Kremenek <kremenek@apple.com>2010-11-15 20:54:24 +0000
commit43f50695a833c4e71f4d5e4f5c64afeb23344cf6 (patch)
tree087f2b0fed89b0a37e879ae024d0beaa39c10c23 /clang/lib/AST/ParentMap.cpp
parent38b469effd842d1f47421bd39569b51aa75d6970 (diff)
downloadbcm5719-llvm-43f50695a833c4e71f4d5e4f5c64afeb23344cf6.tar.gz
bcm5719-llvm-43f50695a833c4e71f4d5e4f5c64afeb23344cf6.zip
Add method ParentMap::addStmt().
llvm-svn: 119181
Diffstat (limited to 'clang/lib/AST/ParentMap.cpp')
-rw-r--r--clang/lib/AST/ParentMap.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/AST/ParentMap.cpp b/clang/lib/AST/ParentMap.cpp
index 5fe873acf7a..21847f28217 100644
--- a/clang/lib/AST/ParentMap.cpp
+++ b/clang/lib/AST/ParentMap.cpp
@@ -40,6 +40,12 @@ ParentMap::~ParentMap() {
delete (MapTy*) Impl;
}
+void ParentMap::addStmt(Stmt* S) {
+ if (S) {
+ BuildParentMap(*(MapTy*) Impl, S);
+ }
+}
+
Stmt* ParentMap::getParent(Stmt* S) const {
MapTy* M = (MapTy*) Impl;
MapTy::iterator I = M->find(S);
OpenPOWER on IntegriCloud