AmrDeveloper wrote:
> I just found another case where this problem occurs:
>
> ```
> struct S {
> S copy();
> S(int);
> ~S();
> bool operator==(const S& other);
> };
>
> int f(S &s1) {
> if (s1.copy() == 1)
> return 1;
> return 0;
> }
> ```
>
> I suspect we're going to see a lot of this. It will happen anywhere that we
> pop a cleanup and then try to use a value that was emitted within the cleanup
> scope body. We need a more general solution. I'm going to explore whether
> something like classic codegen's `ValuesToReload` argument to
> `forceCleanup()` will solve this.
I will address the comments and check `ValuesToReload` too
https://github.com/llvm/llvm-project/pull/183143
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits