[llvm] [SCCP] get rid of potentially dangling iterator (PR #105609)

Alexandros Lamprineas via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 10:55:56 PDT 2024


labrinea wrote:

> > Hi. I am not seeing a modification of KnownConstants between the point where the iterator is initialized and the point it is consumed. Am I missing something?
> 
> https://github.com/llvm/llvm-project/pull/105609/files#diff-066363256b7b4164e66b28a3028b2cb9e405c9136241baa33db76ebd2edb87cdL207

This insertion you have highlighted happens after the call to `visit` where the KnownConstants is read.

https://github.com/llvm/llvm-project/pull/105609


More information about the llvm-commits mailing list