[PATCH] D62946: [analyzer] ProgramPoint: more explicit printJson()
Csaba Dabis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 11:20:49 PDT 2019
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;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62946.204334.patch
Type: text/x-patch
Size: 1949 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190612/6a0ee093/attachment.bin>
More information about the llvm-commits
mailing list