This is an archive of the discontinued LLVM Phabricator instance.

[clang] - Simplify tools::SplitDebugName
ClosedPublic

Authored by grimar on Nov 28 2018, 7:31 AM.

Details

Summary

This is an updated version of the D54576, which was reverted.

Problem was that SplitDebugName calls the InputInfo::getFilename
which asserts if InputInfo given is not of type Filename:

const char *getFilename() const {
  assert(isFilename() && "Invalid accessor.");
  return Data.Filename;
}

At the same time at that point, it can be of type Nothing and
we need to use getBaseInput() it seems, like original code did.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.Nov 28 2018, 7:31 AM

With that the original issue mentioned in the following comment is fixed for me:
https://reviews.llvm.org/rL347035#299232

Cool - thanks! Any chance/way to add a test for this that'd show up sooner than the breakage caused by the previous version?

Thank you for the fix! I will try this version as soon as I am at home (~2 hours from now) and report back if the issues I had are gone.

Cool - thanks! Any chance/way to add a test for this that'd show up sooner than the breakage caused by the previous version?

Maybe, I am not sure. I was not able to trigger this without using the clang-tidy call yet.

Cool - thanks! Any chance/way to add a test for this that'd show up sooner than the breakage caused by the previous version?

Maybe, I am not sure. I was not able to trigger this without using the clang-tidy call yet.

Any chance other clang tools might reproduce this? clang-check maybe (sort of the most trivial clang tool)?

Cool - thanks! Any chance/way to add a test for this that'd show up sooner than the breakage caused by the previous version?

Maybe, I am not sure. I was not able to trigger this without using the clang-tidy call yet.

Any chance other clang tools might reproduce this? clang-check maybe (sort of the most trivial clang tool)?

I'll try to investigate this tomorrow. Never used it I think :)

The issues seems to be resolved for me as well, i will post this patch to the mailing list and ask the other guy if his build is fine, too.

The issues seems to be resolved for me as well, i will post this patch to the mailing list and ask the other guy if his build is fine, too.

Thanks, Jonas!

grimar updated this revision to Diff 175843.Nov 29 2018, 3:17 AM
  • Added the test case.

from my side no objections, mailing list did not react AFAIK (just in case your waiting for me until you recommit).

from my side no objections, mailing list did not react AFAIK (just in case your waiting for me until you recommit).

David requested the test case, I added it and now waiting for his approval :]

dblaikie accepted this revision.Dec 4 2018, 8:47 AM
dblaikie added subscribers: labath, klimek.

Looks good to me - tagging @labath @klimek here in case they have some further context on whether this is the right place for the test. But I'm fine with them providing post-commit review - please go ahead with this change as-is.

This revision is now accepted and ready to land.Dec 4 2018, 8:47 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2019, 3:18 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript