This is an archive of the discontinued LLVM Phabricator instance.

[Error] Make llvm::cantFail include the original error messages
ClosedPublic

Authored by hintonda on Oct 16 2019, 10:16 AM.

Details

Summary

The current implementation eats the current errors and just outputs
the message parameter passed to llvm::cantFail. This change appends
the original error message(s), so the user can see exactly why
cantFail failed.

Diff Detail

Event Timeline

hintonda created this revision.Oct 16 2019, 10:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 16 2019, 10:16 AM
lhames accepted this revision.Oct 17 2019, 12:43 PM

I think this should be made conditional on NDEBUG so that it doesn’t bloat callsites in release mode, but otherwise this looks good to me!

This revision is now accepted and ready to land.Oct 17 2019, 12:43 PM
hintonda updated this revision to Diff 225526.Oct 17 2019, 2:46 PM
  • Wrap new login in !NDEBUG.
This revision was automatically updated to reflect the committed changes.