aboutsummaryrefslogtreecommitdiff
path: root/Analysis/ValueState.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-02-05 21:52:21 +0000
committerTed Kremenek <kremenek@apple.com>2008-02-05 21:52:21 +0000
commit329f854f217d72594a3ec5572eba6320f81a5efa (patch)
tree974cc2c21a193de69644d0bb3b74e7eb2bea9987 /Analysis/ValueState.cpp
parent1fbdb020311efa1b5b7de2758985287418018fac (diff)
Moved subclasses of LValue and NonLValue into their own namespaces.
This noticeably cleans up the naming of these classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46770 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Analysis/ValueState.cpp')
-rw-r--r--Analysis/ValueState.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Analysis/ValueState.cpp b/Analysis/ValueState.cpp
index 9bd02a29bd..aa6ddbdd53 100644
--- a/Analysis/ValueState.cpp
+++ b/Analysis/ValueState.cpp
@@ -17,9 +17,9 @@ using namespace clang;
RValue ValueStateManager::GetValue(const StateTy& St, const LValue& LV) {
switch (LV.getSubKind()) {
- case LValueDeclKind: {
+ case lval::DeclValKind: {
StateTy::VariableBindingsTy::TreeTy* T =
- St.getImpl()->VariableBindings.SlimFind(cast<LValueDecl>(LV).getDecl());
+ St.getImpl()->VariableBindings.SlimFind(cast<lval::DeclVal>(LV).getDecl());
return T ? T->getValue().second : InvalidValue();
}
@@ -47,7 +47,7 @@ RValue ValueStateManager::GetValue(const StateTy& St, Stmt* S, bool* hasVal) {
// within the referenced variables.
case Stmt::DeclRefExprClass:
- return GetValue(St, LValueDecl(cast<DeclRefExpr>(S)->getDecl()));
+ return GetValue(St, lval::DeclVal(cast<DeclRefExpr>(S)->getDecl()));
// Integer literals evaluate to an RValue. Simply retrieve the
// RValue for the literal.
@@ -105,7 +105,7 @@ LValue ValueStateManager::GetLValue(const StateTy& St, Stmt* S) {
S = P->getSubExpr();
if (DeclRefExpr* DR = dyn_cast<DeclRefExpr>(S))
- return LValueDecl(DR->getDecl());
+ return lval::DeclVal(DR->getDecl());
return cast<LValue>(GetValue(St, S));
}
@@ -123,9 +123,9 @@ ValueStateManager::StateTy
ValueStateManager::SetValue(StateTy St, const LValue& LV, const RValue& V) {
switch (LV.getSubKind()) {
- case LValueDeclKind:
- return V.isValid() ? Add(St, cast<LValueDecl>(LV).getDecl(), V)
- : Remove(St, cast<LValueDecl>(LV).getDecl());
+ case lval::DeclValKind:
+ return V.isValid() ? Add(St, cast<lval::DeclVal>(LV).getDecl(), V)
+ : Remove(St, cast<lval::DeclVal>(LV).getDecl());
default:
assert ("SetValue for given LValue type not yet implemented.");