This is an archive of the discontinued LLVM Phabricator instance.

Add CRLF support to LineIterator.
ClosedPublic

Authored by rafael on Oct 17 2014, 7:53 AM.

Details

Reviewers
chandlerc
Summary

The MRI scripts have to work with CRLF, and in general it is probably a good idea to support this in a core utility like LineIterator.

Diff Detail

Event Timeline

rafael updated this revision to Diff 15079.Oct 17 2014, 7:53 AM
rafael retitled this revision from to Add CRLF support to LineIterator..
rafael updated this object.
rafael edited the test plan for this revision. (Show Details)
rafael added a reviewer: chandlerc.
rafael added a subscriber: Unknown Object (MLST).
chandlerc accepted this revision.Nov 1 2014, 6:55 PM
chandlerc edited edge metadata.

So, I'm OK with this... but I wonder what it does to the performance of the line iterator. Hopefully we never care.

I've made a minor suggestion below that should at least make one of the cases quite a bit simpler.

lib/Support/LineIterator.cpp
63–65

This suggests that skipLineEnd should return whether it did indeed skip a line end?

This revision is now accepted and ready to land.Nov 1 2014, 6:55 PM
rafael updated this revision to Diff 15681.Nov 2 2014, 5:09 PM
rafael edited edge metadata.
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r221153.