diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-06-23 09:02:15 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-06-23 09:02:15 +0000 |
commit | d91ee27950ef5c321db1ac2aa5becb75ffe7cb14 (patch) | |
tree | 6064163dc732234d6a2f17096178cf89442657d3 /lib/Analysis/Environment.cpp | |
parent | 2ace5cd1dc3340a4a12a3e0d3df51f094cbfde97 (diff) |
Move all factory methods from SVal to ValueManager. API cleanup!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/Environment.cpp')
-rw-r--r-- | lib/Analysis/Environment.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Analysis/Environment.cpp b/lib/Analysis/Environment.cpp index 7ada6d809b..2b751df830 100644 --- a/lib/Analysis/Environment.cpp +++ b/lib/Analysis/Environment.cpp @@ -18,14 +18,14 @@ using namespace clang; -SVal Environment::GetSVal(const Stmt *E, BasicValueFactory& BasicVals) const { +SVal Environment::GetSVal(const Stmt *E, ValueManager& ValMgr) const { for (;;) { switch (E->getStmtClass()) { case Stmt::AddrLabelExprClass: - return Loc::MakeVal(cast<AddrLabelExpr>(E)); + return ValMgr.makeLoc(cast<AddrLabelExpr>(E)); // ParenExprs are no-ops. @@ -35,11 +35,11 @@ SVal Environment::GetSVal(const Stmt *E, BasicValueFactory& BasicVals) const { case Stmt::CharacterLiteralClass: { const CharacterLiteral* C = cast<CharacterLiteral>(E); - return NonLoc::MakeVal(BasicVals, C->getValue(), C->getType()); + return ValMgr.makeIntVal(C->getValue(), C->getType()); } case Stmt::IntegerLiteralClass: { - return NonLoc::MakeVal(BasicVals, cast<IntegerLiteral>(E)); + return ValMgr.makeIntVal(cast<IntegerLiteral>(E)); } // Casts where the source and target type are the same @@ -69,8 +69,7 @@ SVal Environment::GetSVal(const Stmt *E, BasicValueFactory& BasicVals) const { return LookupExpr(E); } -SVal Environment::GetBlkExprSVal(const Stmt *E, - BasicValueFactory& BasicVals) const { +SVal Environment::GetBlkExprSVal(const Stmt *E, ValueManager& ValMgr) const { while (1) { switch (E->getStmtClass()) { @@ -80,11 +79,11 @@ SVal Environment::GetBlkExprSVal(const Stmt *E, case Stmt::CharacterLiteralClass: { const CharacterLiteral* C = cast<CharacterLiteral>(E); - return NonLoc::MakeVal(BasicVals, C->getValue(), C->getType()); + return ValMgr.makeIntVal(C->getValue(), C->getType()); } case Stmt::IntegerLiteralClass: { - return NonLoc::MakeVal(BasicVals, cast<IntegerLiteral>(E)); + return ValMgr.makeIntVal(cast<IntegerLiteral>(E)); } default: |