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)
commitaba8270dbad556b667db943f5abff63be89e2602
tree74040216e1ea4722c01ed4ed7f98093d913c0248
parent3c0c536300df007927879eaed4835b0b4cc3f3e8
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!

llvm-svn: 168341
llvm/include/llvm/Support/YAMLParser.h
llvm/lib/Support/YAMLParser.cpp
llvm/unittests/Support/YAMLParserTest.cpp