aboutsummaryrefslogtreecommitdiff
path: root/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
commitd6543f8bbac18cdb678a67da2a676c30c2941eca (patch)
treee716cd9c6e453c62bd74a21075c595d0eeafd98a /lib/AST/ParentMap.cpp
parent948163b4986dfb5060c0dbd2e5910431640e56d1 (diff)
Add method ParentMap::addStmt().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ParentMap.cpp')
-rw-r--r--lib/AST/ParentMap.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/AST/ParentMap.cpp b/lib/AST/ParentMap.cpp
index 5fe873acf7..21847f2821 100644
--- a/lib/AST/ParentMap.cpp
+++ b/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);