From 3560ff2c1f49147da6181cfdab88b65b65e6158e Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 27 Aug 2014 20:03:13 +0000 Subject: Return a std::unique_ptr when creating a new MemoryBuffer. llvm-svn: 216583 --- llvm/lib/MC/MCParser/AsmParser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/MC') diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index c82e1183aaf..a1b469d6797 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -2118,8 +2118,8 @@ bool AsmParser::handleMacroEntry(const MCAsmMacro *M, SMLoc NameLoc) { // instantiation. OS << ".endmacro\n"; - std::unique_ptr Instantiation( - MemoryBuffer::getMemBufferCopy(OS.str(), "")); + std::unique_ptr Instantiation = + MemoryBuffer::getMemBufferCopy(OS.str(), ""); // Create the macro instantiation object and add to the current macro // instantiation stack. @@ -4304,8 +4304,8 @@ void AsmParser::instantiateMacroLikeBody(MCAsmMacro *M, SMLoc DirectiveLoc, raw_svector_ostream &OS) { OS << ".endr\n"; - std::unique_ptr Instantiation( - MemoryBuffer::getMemBufferCopy(OS.str(), "")); + std::unique_ptr Instantiation = + MemoryBuffer::getMemBufferCopy(OS.str(), ""); // Create the macro instantiation object and add to the current macro // instantiation stack. -- cgit v1.2.3