summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ParentMap.cpp
diff options
context:
space:
mode:
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