Add filename support to yaml::Input.
ClosedPublic

Authored by trombonehero on Thu, Jul 13, 6:45 PM.

Details

Summary

The current yaml::Input constructor takes a StringRef of data as its
first parameter, discarding any filename information that may have been
present when a YAML file was opened. Add an alterate yaml::Input
constructor that takes a MemoryBufferRef, which can have a filename
associated with it. This leads to clearer diagnostic messages.

Sponsored By: DARPA, AFRL

Diff Detail

Repository
rL LLVM
trombonehero created this revision.Thu, Jul 13, 6:45 PM

(previously known as D11137)

asb added a subscriber: asb.Fri, Jul 14, 4:58 AM

This isn't part of LLVM I usually hack on, but I just wanted to comment to say:

  1. I've manually verified this patch applies cleanly to top of tree and all checks pass
  2. The patch looks good to me, and addresses the final nits from @arphaman in the previous revision. The only other changes vs the previous revision seems to be the removal of CurrentNode from the initialiser list as the field now has a default initialiser (as of rL305969).

@arphaman: are you happy with this patch now?

arphaman accepted this revision.Fri, Jul 14, 7:48 AM

Yep, LGTM. Thanks.

This revision is now accepted and ready to land.Fri, Jul 14, 7:48 AM
This revision was automatically updated to reflect the committed changes.