Update Clang for LLVM API change to use unique_ptr in SourceManager::AddNewSourceBuffer
llvm-svn: 216226
This commit is contained in:
parent
addb75a4f3
commit
9e095d9b6b
|
@ -498,11 +498,11 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) {
|
||||||
|
|
||||||
llvm::SourceMgr TempSrcMgr;
|
llvm::SourceMgr TempSrcMgr;
|
||||||
llvm::MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &TempSrcMgr);
|
llvm::MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &TempSrcMgr);
|
||||||
llvm::MemoryBuffer *Buffer =
|
std::unique_ptr<llvm::MemoryBuffer> Buffer(
|
||||||
llvm::MemoryBuffer::getMemBuffer(AsmString, "<MS inline asm>");
|
llvm::MemoryBuffer::getMemBuffer(AsmString, "<MS inline asm>"));
|
||||||
|
|
||||||
// Tell SrcMgr about this buffer, which is what the parser will pick up.
|
// Tell SrcMgr about this buffer, which is what the parser will pick up.
|
||||||
TempSrcMgr.AddNewSourceBuffer(Buffer, llvm::SMLoc());
|
TempSrcMgr.AddNewSourceBuffer(std::move(Buffer), llvm::SMLoc());
|
||||||
|
|
||||||
std::unique_ptr<llvm::MCStreamer> Str(createNullStreamer(Ctx));
|
std::unique_ptr<llvm::MCStreamer> Str(createNullStreamer(Ctx));
|
||||||
std::unique_ptr<llvm::MCAsmParser> Parser(
|
std::unique_ptr<llvm::MCAsmParser> Parser(
|
||||||
|
|
|
@ -295,7 +295,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
|
||||||
SourceMgr SrcMgr;
|
SourceMgr SrcMgr;
|
||||||
|
|
||||||
// Tell SrcMgr about this buffer, which is what the parser will pick up.
|
// Tell SrcMgr about this buffer, which is what the parser will pick up.
|
||||||
SrcMgr.AddNewSourceBuffer(Buffer->release(), SMLoc());
|
SrcMgr.AddNewSourceBuffer(std::move(*Buffer), SMLoc());
|
||||||
|
|
||||||
// Record the location of the include directories so that the lexer can find
|
// Record the location of the include directories so that the lexer can find
|
||||||
// it later.
|
// it later.
|
||||||
|
|
Loading…
Reference in New Issue