These classes only need a StringRef, not a MemoryBuffer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215945 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-08-18 22:28:28 +00:00
parent 285133714f
commit 0282239051
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -29,11 +29,11 @@ Module *llvm::ParseAssembly(std::unique_ptr<MemoryBuffer> F, Module *M,
// If we are parsing into an existing module, do it.
if (M)
return LLParser(Buf, SM, Err, M).Run() ? nullptr : M;
return LLParser(Buf->getBuffer(), SM, Err, M).Run() ? nullptr : M;
// Otherwise create a new module.
std::unique_ptr<Module> M2(new Module(Buf->getBufferIdentifier(), Context));
if (LLParser(Buf, SM, Err, M2.get()).Run())
if (LLParser(Buf->getBuffer(), SM, Err, M2.get()).Run())
return nullptr;
return M2.release();
}