summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/LiveVariables.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-30 21:35:30 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-30 21:35:30 +0000
commit378e7fd330d9b0328fd2d20f6edab9006eb43dd3 (patch)
tree2b1254f4115e07349f6452e6c40d2fff381ea537 /clang/lib/Analysis/LiveVariables.cpp
parent35972a9460975bca008d3fe4a0736f725f67dc47 (diff)
downloadbcm5719-llvm-378e7fd330d9b0328fd2d20f6edab9006eb43dd3.tar.gz
bcm5719-llvm-378e7fd330d9b0328fd2d20f6edab9006eb43dd3.zip
Fix horrible non-termination bug in LiveVariables. The issue was that
the liveness state of block-level expressions could oscillate because of two issues: - The initial value before a merge was not always set to "Top" - The set of live block-level expressions is a union, not an intersection This fixes <rdar://problem/650084>. llvm-svn: 63421
Diffstat (limited to 'clang/lib/Analysis/LiveVariables.cpp')
-rw-r--r--clang/lib/Analysis/LiveVariables.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp
index 4c86d44e4db..23f6f461aa1 100644
--- a/clang/lib/Analysis/LiveVariables.cpp
+++ b/clang/lib/Analysis/LiveVariables.cpp
@@ -130,7 +130,7 @@ public:
void VisitTerminator(CFGBlock* B);
void SetTopValue(LiveVariables::ValTy& V) {
- V = AD.AlwaysLive;
+ V = AD.AlwaysLive;
}
};
@@ -300,7 +300,7 @@ struct Merge {
void operator()(ValTy& Dst, const ValTy& Src) {
Dst.OrDeclBits(Src);
- Dst.AndBlkExprBits(Src);
+ Dst.OrBlkExprBits(Src);
}
};
OpenPOWER on IntegriCloud