As already noted by Rafael, once https://reviews.llvm.org/D24594 will land, we won't need this anymore.
Details
Diff Detail
Event Timeline
lib/LTO/LTO.cpp | ||
---|---|---|
341 | I wonder if we should instead assert that we don't have an undefined symbol with a prevailing resolution. |
lib/LTO/LTO.cpp | ||
---|---|---|
341 | That sounds like a great idea - that's what intrigued me in the first place and what I was trying to figure out in the debugger yesterday for PR30363. |
I'll reformulate: what is the semantic of having a prevailing resolution for an undefined symbol?
If there is none we should error (or at least assert).
I don't think an undefined can have a prevailing resolution, at least in lld and gold.
lib/LTO/LTO.cpp | ||
---|---|---|
390 | We should have the same assert in this loop (maybe in a separate patch) |
lib/LTO/LTO.cpp | ||
---|---|---|
390 | Oh, sure :) I'm still not very familiar with Thin so I didn't think about it. Thanks! |
lib/LTO/LTO.cpp | ||
---|---|---|
390 | Or you could add it to addSymbolToGlobalRes. |
So, are you OK with committing this assertion (after it's moved to addSymbolToGlobalRes())
I wonder if we should instead assert that we don't have an undefined symbol with a prevailing resolution.