This is an archive of the discontinued LLVM Phabricator instance.

[Remarks] Extend the RemarkStreamer to support other emitters
ClosedPublic

Authored by thegameg on Jan 29 2020, 5:14 PM.

Details

Summary

This extends the RemarkStreamer to allow for other emitters (e.g. frontends, SIL, etc.) to emit remarks through a common interface.

See changes in llvm/docs/Remarks.rst for motivation and design choices.

Diff Detail

Event Timeline

thegameg created this revision.Jan 29 2020, 5:14 PM
JDevlieghere accepted this revision.Feb 4 2020, 3:57 PM

LGTM with some nits inline.

llvm/docs/Remarks.rst
630

This sentence is pretty long and complex. Maybe add a full stop instead of the comma and start a new sentence.

644

I think the trade-off is clear, but if you really want to be explicit maybe just say at the cost of an extra layer of abstraction.

llvm/include/llvm/IR/LLVMContext.h
225–228

why is Main capitalized but not remark streamer? I think this should all be lowercase? That would be consistent with the rest of the patch.

This revision is now accepted and ready to land.Feb 4 2020, 3:57 PM
This revision was automatically updated to reflect the committed changes.
thegameg marked 2 inline comments as done.
llvm/include/llvm/IR/LLVMRemarkStreamer.h