================
@@ -257,13 +257,29 @@ CaptureComponents
EarliestEscapeAnalysis::getCapturesBefore(
return isNotInCycle(I, &DT, LI, CI);
}
- return !isPotentiallyReachable(CaptureInst, I, nullptr, &DT, LI, CI);
+ if (isPotentiallyReachable(CaptureInst, I, nullptr, &DT, LI, CI))
+ return false;
+
+ // A `longjmp` may re-enter the function at any `returns_twice` call
+ // (e.g. `setjmp`), If the function contains such a call, conservatively
+ // treat the object as captured.
+ if (containsReturnsTwiceCall())
+ return false;
----------------
midhuncodes7 wrote:
Moved as suggested
https://github.com/llvm/llvm-project/pull/212297
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits