diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-27 19:03:22 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-27 19:03:22 +0000 |
commit | 68669e3a7b268b1769b17146c85ceda72a1da2bb (patch) | |
tree | 4a63081f787e8858197c092d660e263e71654fec /llvm/unittests/Support/YAMLParserTest.cpp | |
parent | 00cc1c09c3b26c50367b24e8cf365308b10ebc76 (diff) | |
download | llvm-68669e3a7b268b1769b17146c85ceda72a1da2bb.zip llvm-68669e3a7b268b1769b17146c85ceda72a1da2bb.tar.gz llvm-68669e3a7b268b1769b17146c85ceda72a1da2bb.tar.bz2 |
yaml::Stream doesn't need to take ownership of the buffer.
In fact, most users were already using the StringRef version.
llvm-svn: 216575
Diffstat (limited to 'llvm/unittests/Support/YAMLParserTest.cpp')
-rw-r--r-- | llvm/unittests/Support/YAMLParserTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/Support/YAMLParserTest.cpp b/llvm/unittests/Support/YAMLParserTest.cpp index 1a5188a..6374638 100644 --- a/llvm/unittests/Support/YAMLParserTest.cpp +++ b/llvm/unittests/Support/YAMLParserTest.cpp @@ -212,7 +212,7 @@ TEST(YAMLParser, DiagnosticFilenameFromBufferID) { // we get its ID as filename in diagnostics. std::unique_ptr<MemoryBuffer> Buffer( MemoryBuffer::getMemBuffer("[]", "buffername.yaml")); - yaml::Stream Stream(std::move(Buffer), SM); + yaml::Stream Stream(Buffer->getMemBufferRef(), SM); Stream.printError(Stream.begin()->getRoot(), "Hello, World!"); EXPECT_EQ("buffername.yaml", GeneratedDiag.getFilename()); } |