This is an archive of the discontinued LLVM Phabricator instance.

[ASTImporter][NFC] Dump decl name at assertion violation
ClosedPublic

Authored by steakhal on Nov 11 2021, 5:46 AM.

Details

Summary

Sometimes it would be useful to see which Decl kind caused some issue,
along with the name of the concrete instance of the Decl in the source
code.

Diff Detail

Event Timeline

steakhal created this revision.Nov 11 2021, 5:46 AM
steakhal requested review of this revision.Nov 11 2021, 5:46 AM
shafik added inline comments.Nov 11 2021, 8:22 AM
clang/lib/AST/ASTImporterLookupTable.cpp
107

This feels more like an assert case rather than an llvm_unreachable case.

steakhal marked an inline comment as done.Nov 11 2021, 9:10 AM
steakhal added inline comments.
clang/lib/AST/ASTImporterLookupTable.cpp
107

I want to display a runtime constructed error message before actually terminating the application. AFAIK asserts cannot accomplish this.

martong accepted this revision.Nov 12 2021, 5:08 AM

LGTM

This revision is now accepted and ready to land.Nov 12 2021, 5:08 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptNov 19 2021, 2:31 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript