diff options
author | Anna Zaks <ganna@apple.com> | 2011-10-07 21:01:38 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-10-07 21:01:38 +0000 |
commit | 63d3201619fdac284adfd3b9328562fa20a01c40 (patch) | |
tree | b5b9131a4262a87332a66dce8bb450c5ecc160c8 /lib/StaticAnalyzer/Core/CoreEngine.cpp | |
parent | 8828ee7faa42f889ade3bb635dc5f1338be671b1 (diff) |
ProgramPoint cleanup after the previous commit r141408 (remove the copy constructor, mark withTag const).
Move getProgramPoint() utility from CoreEngine.cpp into ProgramPoint.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141414 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/CoreEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/CoreEngine.cpp | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/lib/StaticAnalyzer/Core/CoreEngine.cpp b/lib/StaticAnalyzer/Core/CoreEngine.cpp index 2511ca778d..c675f608b5 100644 --- a/lib/StaticAnalyzer/Core/CoreEngine.cpp +++ b/lib/StaticAnalyzer/Core/CoreEngine.cpp @@ -541,31 +541,6 @@ ExplodedNode *StmtNodeBuilder::MakeNode(ExplodedNodeSet &Dst, return N; } -static ProgramPoint GetProgramPoint(const Stmt *S, ProgramPoint::Kind K, - const LocationContext *LC, - const ProgramPointTag *tag){ - switch (K) { - default: - llvm_unreachable("Unhandled ProgramPoint kind"); - case ProgramPoint::PreStmtKind: - return PreStmt(S, LC, tag); - case ProgramPoint::PostStmtKind: - return PostStmt(S, LC, tag); - case ProgramPoint::PreLoadKind: - return PreLoad(S, LC, tag); - case ProgramPoint::PostLoadKind: - return PostLoad(S, LC, tag); - case ProgramPoint::PreStoreKind: - return PreStore(S, LC, tag); - case ProgramPoint::PostStoreKind: - return PostStore(S, LC, tag); - case ProgramPoint::PostLValueKind: - return PostLValue(S, LC, tag); - case ProgramPoint::PostPurgeDeadSymbolsKind: - return PostPurgeDeadSymbols(S, LC, tag); - } -} - ExplodedNode* StmtNodeBuilder::generateNodeInternal(const Stmt *S, const ProgramState *state, @@ -573,8 +548,8 @@ StmtNodeBuilder::generateNodeInternal(const Stmt *S, ProgramPoint::Kind K, const ProgramPointTag *tag) { - const ProgramPoint &L = GetProgramPoint(S, K, Pred->getLocationContext(), - tag); + const ProgramPoint &L = ProgramPoint::getProgramPoint(S, K, + Pred->getLocationContext(), tag); return generateNodeInternal(L, state, Pred); } |