diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
commit | 6148c19c738a92f344008aa3f88f4e008bada0ee (patch) | |
tree | d4426858455f04d0d8c25a2f9eb9ea5582ffe1b6 /contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp | |
parent | 2c8643c6396b0a3db33430cf9380e70bbb9efce0 (diff) | |
parent | 173a4f43a911175643bda81ee675e8d9269056ea (diff) | |
download | FreeBSD-src-6148c19c738a92f344008aa3f88f4e008bada0ee.zip FreeBSD-src-6148c19c738a92f344008aa3f88f4e008bada0ee.tar.gz |
Merge clang 3.5.0 release from ^/vendor/clang/dist, resolve conflicts,
and preserve our customizations, where necessary.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp b/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp index 3d363fa..d7104b1 100644 --- a/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp +++ b/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp @@ -21,7 +21,8 @@ using namespace clang; //than a page, almost certainly enough for anything. :) static const unsigned ScratchBufSize = 4060; -ScratchBuffer::ScratchBuffer(SourceManager &SM) : SourceMgr(SM), CurBuffer(0) { +ScratchBuffer::ScratchBuffer(SourceManager &SM) + : SourceMgr(SM), CurBuffer(nullptr) { // Set BytesUsed so that the first call to getToken will require an alloc. BytesUsed = ScratchBufSize; } @@ -65,7 +66,7 @@ void ScratchBuffer::AllocScratchBuffer(unsigned RequestLen) { llvm::MemoryBuffer *Buf = llvm::MemoryBuffer::getNewMemBuffer(RequestLen, "<scratch space>"); - FileID FID = SourceMgr.createFileIDForMemBuffer(Buf); + FileID FID = SourceMgr.createFileID(Buf); BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); CurBuffer = const_cast<char*>(Buf->getBufferStart()); BytesUsed = 1; |