This revision was automatically updated to reflect the committed changes. Closed by commit rL363187: [analyzer] ProgramPoint: more explicit printJson() (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D62946?vs=203328&id=204334#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62946/new/ https://reviews.llvm.org/D62946 Files: cfe/trunk/lib/Analysis/ProgramPoint.cpp Index: cfe/trunk/lib/Analysis/ProgramPoint.cpp =================================================================== --- cfe/trunk/lib/Analysis/ProgramPoint.cpp +++ cfe/trunk/lib/Analysis/ProgramPoint.cpp @@ -99,12 +99,6 @@ case ProgramPoint::CallExitEndKind: Out << "CallExitEnd\""; break; - case ProgramPoint::PostStmtPurgeDeadSymbolsKind: - Out << "PostStmtPurgeDeadSymbols\""; - break; - case ProgramPoint::PreStmtPurgeDeadSymbolsKind: - Out << "PreStmtPurgeDeadSymbols\""; - break; case ProgramPoint::EpsilonKind: Out << "EpsilonPoint\""; break; @@ -210,20 +204,35 @@ Out << ", "; printLocJson(Out, S->getBeginLoc(), SM); - Out << ", \"stmt_point_kind\": "; - if (getAs<PreStmt>()) - Out << "\"PreStmt\""; + Out << ", \"stmt_point_kind\": \""; + if (getAs<PreLoad>()) + Out << "PreLoad"; + else if (getAs<PreStore>()) + Out << "PreStore"; + else if (getAs<PostAllocatorCall>()) + Out << "PostAllocatorCall"; + else if (getAs<PostCondition>()) + Out << "PostCondition"; else if (getAs<PostLoad>()) - Out << "\"PostLoad\""; - else if (getAs<PostStore>()) - Out << "\"PostStore\""; + Out << "PostLoad"; else if (getAs<PostLValue>()) - Out << "\"PostLValue\""; - else if (getAs<PostAllocatorCall>()) - Out << "\"PostAllocatorCall\""; - else - Out << "null"; + Out << "PostLValue"; + else if (getAs<PostStore>()) + Out << "PostStore"; + else if (getAs<PostStmt>()) + Out << "PostStmt"; + else if (getAs<PostStmtPurgeDeadSymbols>()) + Out << "PostStmtPurgeDeadSymbols"; + else if (getAs<PreStmtPurgeDeadSymbols>()) + Out << "PreStmtPurgeDeadSymbols"; + else if (getAs<PreStmt>()) + Out << "PreStmt"; + else { + Out << "\nKind: '" << getKind(); + llvm_unreachable("' is unhandled StmtPoint kind!"); + } + Out << '\"'; break; } }
Index: cfe/trunk/lib/Analysis/ProgramPoint.cpp =================================================================== --- cfe/trunk/lib/Analysis/ProgramPoint.cpp +++ cfe/trunk/lib/Analysis/ProgramPoint.cpp @@ -99,12 +99,6 @@ case ProgramPoint::CallExitEndKind: Out << "CallExitEnd\""; break; - case ProgramPoint::PostStmtPurgeDeadSymbolsKind: - Out << "PostStmtPurgeDeadSymbols\""; - break; - case ProgramPoint::PreStmtPurgeDeadSymbolsKind: - Out << "PreStmtPurgeDeadSymbols\""; - break; case ProgramPoint::EpsilonKind: Out << "EpsilonPoint\""; break; @@ -210,20 +204,35 @@ Out << ", "; printLocJson(Out, S->getBeginLoc(), SM); - Out << ", \"stmt_point_kind\": "; - if (getAs<PreStmt>()) - Out << "\"PreStmt\""; + Out << ", \"stmt_point_kind\": \""; + if (getAs<PreLoad>()) + Out << "PreLoad"; + else if (getAs<PreStore>()) + Out << "PreStore"; + else if (getAs<PostAllocatorCall>()) + Out << "PostAllocatorCall"; + else if (getAs<PostCondition>()) + Out << "PostCondition"; else if (getAs<PostLoad>()) - Out << "\"PostLoad\""; - else if (getAs<PostStore>()) - Out << "\"PostStore\""; + Out << "PostLoad"; else if (getAs<PostLValue>()) - Out << "\"PostLValue\""; - else if (getAs<PostAllocatorCall>()) - Out << "\"PostAllocatorCall\""; - else - Out << "null"; + Out << "PostLValue"; + else if (getAs<PostStore>()) + Out << "PostStore"; + else if (getAs<PostStmt>()) + Out << "PostStmt"; + else if (getAs<PostStmtPurgeDeadSymbols>()) + Out << "PostStmtPurgeDeadSymbols"; + else if (getAs<PreStmtPurgeDeadSymbols>()) + Out << "PreStmtPurgeDeadSymbols"; + else if (getAs<PreStmt>()) + Out << "PreStmt"; + else { + Out << "\nKind: '" << getKind(); + llvm_unreachable("' is unhandled StmtPoint kind!"); + } + Out << '\"'; break; } }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits