================
@@ -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())
----------------
Xazax-hun wrote:
I think instead of encoding the traversal here inline we should have a
`forEachOrigin` or similar implemented on the tree that is efficient (not
recursive using the stack), and pass in a closure here to emit the facts that
we want.
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