================
@@ -365,13 +376,18 @@ void FactsGenerator::VisitUnaryOperator(const
UnaryOperator *UO) {
}
}
+void FactsGenerator::emitReturnEscapes(OriginNode *N, const Expr *RetExpr) {
+ if (!N)
+ return;
+ EscapesInCurrentBlock.push_back(
+ FactMgr.createFact<ReturnEscapeFact>(N->getOriginID(), RetExpr));
+ for (const OriginNode::Edge &E : N->children())
----------------
aeft wrote:
Thanks for the suggestion. This makes it much cleaner.
I have extracted `forEachOrigin` and refactored the code:
\- `Lattice transfer(Lattice In, const UseFact &UF)`
\- `void FactsGenerator::VisitReturnStmt(const ReturnStmt *RS)`
\- `void FactsGenerator::flow(OriginNode *Dst, OriginNode *Src, bool Kill)`
https://github.com/llvm/llvm-project/pull/201510
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits