This is a follow-up to D49362
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/AsmParser/LLParser.cpp | ||
---|---|---|
7473 ↗ | (On Diff #174766) | Is this change a necessity, or just a cleanup? If the latter, would be better to split into a separate NFC patch. I like the name change from EmptyVI to the more accurate/descriptive FwdVIRef. But is there any advantage in having it just be the ref and not the whole VI (i.e. a FwdVI)? It requires more code to do the comparison (getRef() invocations). |
lib/AsmParser/LLParser.cpp | ||
---|---|---|
7473 ↗ | (On Diff #174766) | Since now some of forward references are read-only and some are not. This means we can't check for forward declaration simply comparing `VI == EmptyVI```, can we? As far as I understand there is no overloaded operator '== ' in ValueInfo and this means we'll do member wise comparison and in such case read only ValueInfo will not be equal to writable even if pointer value is the same. |
lgtm
lib/AsmParser/LLParser.cpp | ||
---|---|---|
7473 ↗ | (On Diff #174766) | Right, I forgot about the fact that the read only flag is set before we resolve the forward ref. Nevermind then. |