Allow using MemoryBuffers with yaml::Stream directly.
authorSean Silva <silvas@purdue.edu>
Mon, 19 Nov 2012 23:21:47 +0000 (23:21 +0000)
committerSean Silva <silvas@purdue.edu>
Mon, 19 Nov 2012 23:21:47 +0000 (23:21 +0000)
commit525398e1376b0d61fe80a83ed2261e2e6e6ab4a3
tree3df0b56f68780ba5f41c3ee6d1e9cc03c2c3e614
parentc4639d6ec2cf1e66d0bbc22db9ec530419b18784
Allow using MemoryBuffers with yaml::Stream directly.

The rationale is to get YAML filenames in diagnostics from
yaml::Stream::printError -- currently the filename is hard-coded as
"YAML" because there's no buffer information available.

Patch by Kim Gräsman!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168341 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/YAMLParser.h
lib/Support/YAMLParser.cpp
unittests/Support/YAMLParserTest.cpp