[PATCH] YAML Input improvement
jonathan.anderson at mun.ca
Fri Jul 24 09:21:17 PDT 2015
The current yaml::Input constructor only takes a StringRef for its first
parameter: clients pass in raw string data. This means that, for the
typical use case of opening a file and parsing it, we throw away the
filename information and report errors as occurring in "YAML".
This patch adds an alterate yaml::Input constructor that takes a
reference to a MemoryBuffer, then extracts the buffer and whatever
identifier is associated with that buffer and passes them to the
underlying yaml::Stream as a MemoryBufferRef.
There’s also a Phabricator review open at
http://reviews.llvm.org/D11137, but I’ve also attached the patch for
those who prefer that workflow.
Thanks very much to Alex Lorenz and Duncan Smith for their helpful
comments on the patch and the process for getting it reviewed.
Electrical and Computer Engineering
Memorial University of Newfoundland
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the llvm-commits