mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Explicitly pass ownership of the MemoryBuffer to AddNewSourceBuffer using std::unique_ptr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216223 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -373,12 +373,12 @@ int main(int argc, char **argv) {
|
||||
errs() << ProgName << ": " << EC.message() << '\n';
|
||||
return 1;
|
||||
}
|
||||
MemoryBuffer *Buffer = BufferPtr->release();
|
||||
MemoryBuffer *Buffer = BufferPtr->get();
|
||||
|
||||
SourceMgr SrcMgr;
|
||||
|
||||
// Tell SrcMgr about this buffer, which is what the parser will pick up.
|
||||
SrcMgr.AddNewSourceBuffer(Buffer, SMLoc());
|
||||
SrcMgr.AddNewSourceBuffer(std::move(*BufferPtr), SMLoc());
|
||||
|
||||
// Record the location of the include directories so that the lexer can find
|
||||
// it later.
|
||||
|
Reference in New Issue
Block a user