aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis/Support/ExprDeclBitVector.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-03-20 21:46:49 +0000
committerTed Kremenek <kremenek@apple.com>2008-03-20 21:46:49 +0000
commitfa59f1f053235e9adf32425f2b6049185771246d (patch)
treed3b6aa5a9fe1b93062a6a08ac676d600f6bf0475 /include/clang/Analysis/Support/ExprDeclBitVector.h
parent4c0c97dd5457ea4c79f44efc90b151a5775a1f0a (diff)
LiveVariables analysis now uses intersect for the merge of block-level expression liveness information.
The rationale is that a block-level expression cannot be live in a parent block unless it is live in all of the successor blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48618 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/Support/ExprDeclBitVector.h')
-rw-r--r--include/clang/Analysis/Support/ExprDeclBitVector.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/clang/Analysis/Support/ExprDeclBitVector.h b/include/clang/Analysis/Support/ExprDeclBitVector.h
index 558331e32e..e54bacae7b 100644
--- a/include/clang/Analysis/Support/ExprDeclBitVector.h
+++ b/include/clang/Analysis/Support/ExprDeclBitVector.h
@@ -119,7 +119,7 @@ struct DeclBitVector_Types {
const llvm::BitVector::reference getDeclBit(unsigned i) const {
return const_cast<llvm::BitVector&>(DeclBV)[i];
}
-
+
ValTy& operator|=(const ValTy& RHS) {
assert (sizesEqual(RHS));
DeclBV |= RHS.DeclBV;
@@ -132,6 +132,14 @@ struct DeclBitVector_Types {
return *this;
}
+ ValTy& OrDeclBits(const ValTy& RHS) {
+ return operator|=(RHS);
+ }
+
+ ValTy& AndDeclBits(const ValTy& RHS) {
+ return operator&=(RHS);
+ }
+
bool sizesEqual(const ValTy& RHS) const {
return DeclBV.size() == RHS.DeclBV.size();
}
@@ -225,6 +233,16 @@ struct ExprDeclBitVector_Types {
return const_cast<llvm::BitVector&>(ExprBV)[i];
}
+ ValTy& OrExprBits(const ValTy& RHS) {
+ ExprBV |= RHS.ExprBV;
+ return *this;
+ }
+
+ ValTy& AndExprBits(const ValTy& RHS) {
+ ExprBV &= RHS.ExprBV;
+ return *this;
+ }
+
ValTy& operator|=(const ValTy& RHS) {
assert (sizesEqual(RHS));
ParentRef(*this) |= ParentRef(RHS);