This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen/AccelTable]: Handle -dwarf-linkage-names=Abstract correctly
ClosedPublic

Authored by labath on May 11 2018, 5:16 AM.

Details

Summary

If we are not emitting a linkage name in the .debug_info sections, we
should not add it into the index either. This makes sure our index is
consistent with the actual debug info.

I am also explicitly setting the --dwarf-linkage-names=All in the
name-collsions test as that one would now fail on targets where this
defaults to "Abstract" (in fact, it would have failed already if there
wasn't a bug in the DWARF verifier, which I fix as well).

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.May 11 2018, 5:16 AM
JDevlieghere accepted this revision.May 14 2018, 3:36 AM

LGTM. I wonder if we should we have a negative test as well?

This revision is now accepted and ready to land.May 14 2018, 3:36 AM

LGTM. I wonder if we should we have a negative test as well?

There's an --implicit-check-not in the ABSTRACT case. Is that what you meant? I can try to rearrange the RUN lines to make it more obvious.

LGTM. I wonder if we should we have a negative test as well?

There's an --implicit-check-not in the ABSTRACT case. Is that what you meant? I can try to rearrange the RUN lines to make it more obvious.

I meant for the missing ++NumErrors;. But on checking the existing test (debug-names-verify-entries.s) we already check the return value, which just happens to be non-zero because of the other failures. I'm okay with keeping it as is.

I meant for the missing ++NumErrors;. But on checking the existing test (debug-names-verify-entries.s) we already check the return value, which just happens to be non-zero because of the other failures. I'm okay with keeping it as is.

Ah, right. I though about that too. The only way to test that thoroughly would be to split each check into a separate test case, which checks only one kind of an error, but that seemed very inconvenient. I guess the right fix here would be to change the verifier interface to make it harder/impossible to report an "error" without affecting the overall return value.

Thanks for the review.

This revision was automatically updated to reflect the committed changes.