aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/AnalysisContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/AnalysisContext.cpp')
-rw-r--r--lib/Analysis/AnalysisContext.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Analysis/AnalysisContext.cpp b/lib/Analysis/AnalysisContext.cpp
index 2c337f07c3..884cbc65f4 100644
--- a/lib/Analysis/AnalysisContext.cpp
+++ b/lib/Analysis/AnalysisContext.cpp
@@ -104,6 +104,20 @@ LiveVariables *AnalysisContext::getLiveVariables() {
return liveness;
}
+LiveVariables *AnalysisContext::getRelaxedLiveVariables() {
+ if (!relaxedLiveness) {
+ CFG *c = getCFG();
+ if (!c)
+ return 0;
+
+ relaxedLiveness = new LiveVariables(*this, false);
+ relaxedLiveness->runOnCFG(*c);
+ relaxedLiveness->runOnAllBlocks(*c, 0, true);
+ }
+
+ return relaxedLiveness;
+}
+
AnalysisContext *AnalysisContextManager::getContext(const Decl *D,
idx::TranslationUnit *TU) {
AnalysisContext *&AC = Contexts[D];