mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user