aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/AnalysisDeclContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis/AnalysisDeclContext.cpp')
-rw-r--r--clang/lib/Analysis/AnalysisDeclContext.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Analysis/AnalysisDeclContext.cpp b/clang/lib/Analysis/AnalysisDeclContext.cpp
index c90d947..ef9ce56 100644
--- a/clang/lib/Analysis/AnalysisDeclContext.cpp
+++ b/clang/lib/Analysis/AnalysisDeclContext.cpp
@@ -189,6 +189,9 @@ CFG *AnalysisDeclContext::getCFG() {
if (PM)
addParentsForSyntheticStmts(cfg.get(), *PM);
+
+ // The Obersver should only observe one build of the CFG.
+ getCFGBuildOptions().Observer = 0;
}
return cfg.get();
}
@@ -205,6 +208,9 @@ CFG *AnalysisDeclContext::getUnoptimizedCFG() {
if (PM)
addParentsForSyntheticStmts(completeCFG.get(), *PM);
+
+ // The Obersver should only observe one build of the CFG.
+ getCFGBuildOptions().Observer = 0;
}
return completeCFG.get();
}