This is an archive of the discontinued LLVM Phabricator instance.

[TableGen] Emit more helpful error messages on empty type set
ClosedPublic

Authored by arichardson on Mar 28 2021, 8:06 AM.

Details

Summary

I have seen this error quite frequently in our out-of-tree CHERI backends
and the lack of location information sometimes makes it quite difficult
to track down the actual source of the error.
This patch changes the llvm_unreachable() to a PrintFatalError() so that
tablegen prints a stack of source locations.

Diff Detail

Event Timeline

arichardson created this revision.Mar 28 2021, 8:06 AM
arichardson requested review of this revision.Mar 28 2021, 8:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 28 2021, 8:06 AM

The fact that this is under NDEBUG at all seems rather dubious

craig.topper accepted this revision.Mar 29 2021, 9:53 PM

Seems reasonable to me. Whether we want to move that out of NDEBUG is a different issue. We get a lot of compile time complaints about tablegen in release builds.

This revision is now accepted and ready to land.Mar 29 2021, 9:53 PM
foad added a subscriber: foad.Mar 30 2023, 10:33 AM

The fact that this is under NDEBUG at all seems rather dubious

See D147127.

Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 10:33 AM