This is an archive of the discontinued LLVM Phabricator instance.

[LTO] Allow pass remarks with hotness to be set when emitting to stderr
ClosedPublic

Authored by tejohnson on May 3 2018, 7:15 AM.

Details

Summary

Set setDiagnosticsHotnessRequested before the early exit check for a
diagnostic output file, so that pass remarks with hotness works when
emitting pass remarks to stderr (e.g. via -pass-remarks=.).

Also fix the llvm-lto2 diagnistic handler so that it only calls exit(1)
when the diagnistic is an error type. Otherwise the new test invocation
of llvm-lto2 with -pass-remarks causes it to fail. The new code is
consistent with the diagnostic handler elsewhere (e.g. on the
LLVMContext).

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.May 3 2018, 7:15 AM
pcc accepted this revision.May 4 2018, 4:40 PM

LGTM

This revision is now accepted and ready to land.May 4 2018, 4:40 PM
This revision was automatically updated to reflect the committed changes.