This is an archive of the discontinued LLVM Phabricator instance.

[flang] Implement a runtime routine to report fatal errors with source position
ClosedPublic

Authored by PeteSteinfeld on Jan 28 2022, 1:22 PM.

Details

Summary

The title says it all.

I implemented a routine called "Crash" and added a test.

Diff Detail

Event Timeline

PeteSteinfeld created this revision.Jan 28 2022, 1:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2022, 1:22 PM
PeteSteinfeld requested review of this revision.Jan 28 2022, 1:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2022, 1:22 PM
klausler accepted this revision.Jan 28 2022, 1:44 PM
klausler added inline comments.
flang/runtime/stop.cpp
149

Could be one line with the use of an anonymous Terminator:

Fortran::runtime::Terminator{source, line}.Crash(message);
This revision is now accepted and ready to land.Jan 28 2022, 1:44 PM
PeteSteinfeld added inline comments.Jan 28 2022, 3:45 PM
flang/runtime/stop.cpp
149

Thanks! I'll change it.

This revision was landed with ongoing or failed builds.Jan 28 2022, 3:48 PM
This revision was automatically updated to reflect the committed changes.