Early exit identified as not being a TLV access is correct. In particular the 'all' namespace is completely valid here for things like layout-after references.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp | ||
---|---|---|
63 | Can you add a comment explaining how you could get here? That said, is the check worth it now? i.e. do we really need the early exit? |
LGTM. Thanks Jim!
lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp | ||
---|---|---|
63 | This is consistent with how GOT references (which are handled very similarly) are checked. We may try to improve on it in the future for performance reasons, but I'm happy with it for now. |
lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp | ||
---|---|---|
63 | A comment to that effect in the code seems a totally reasonable thing. The very fact that this patch is necessary is evidence that it's not completely obvious. |
lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp | ||
---|---|---|
63 | There are two things going on here:
Given how common this kind of check is, commenting this here probably isn't the right option. I'll file bugs to look into (1) and (2) instead. |
lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp | ||
---|---|---|
63 | For reference (though unfortunately it'll be primarily useful only to Apple people) I've filed rdar://problem/24119407 to track the issues above. |
Can you add a comment explaining how you could get here? That said, is the check worth it now? i.e. do we really need the early exit?