Home | History | Annotate | Download | only in Basic

Lines Matching refs:Buffer

40     delete Buffer.getPointer();
46 return Buffer.getPointer() ? Buffer.getPointer()->getBufferSize() : 0;
49 /// Returns the kind of memory used to back the memory buffer for
52 assert(Buffer.getPointer());
55 if (!Buffer.getPointer())
58 llvm::MemoryBuffer *buf = Buffer.getPointer();
64 /// scratch buffer. If the ContentCache encapsulates a source file, that
67 return Buffer.getPointer() ? (unsigned) Buffer.getPointer()->getBufferSize()
72 if (B && B == Buffer.getPointer()) {
73 assert(0 && "Replacing with the same buffer");
74 Buffer.setInt(DoNotFree? DoNotFreeFlag : 0);
79 delete Buffer.getPointer();
80 Buffer.setPointer(B);
81 Buffer.setInt(DoNotFree? DoNotFreeFlag : 0);
88 // Lazily create the Buffer for ContentCaches that wrap files. If we already
90 if (Buffer.getPointer() || !ContentsEntry) {
94 return Buffer.getPointer();
99 Buffer.setPointer(SM.getFileManager().getBufferForFile(ContentsEntry,
107 // really deal with this situation, just create an empty buffer.
113 if (!Buffer.getPointer()) {
115 Buffer.setPointer(MemoryBuffer::getNewMemBuffer(ContentsEntry->getSize(),
117 char *Ptr = const_cast<char*>(Buffer.getPointer()->getBufferStart());
128 Buffer.setInt(Buffer.getInt() | InvalidFlag);
131 return Buffer.getPointer();
144 Buffer.setInt(Buffer.getInt() | InvalidFlag);
146 return Buffer.getPointer();
149 // If the buffer is valid, check to see if it has a UTF Byte Order Mark
152 StringRef BufStr = Buffer.getPointer()->getBuffer();
169 Buffer.setInt(Buffer.getInt() | InvalidFlag);
175 return Buffer.getPointer();
462 /// memory buffer. This does no caching.
464 SourceManager::createMemBufferContentCache(llvm::MemoryBuffer *Buffer) {
469 Entry->setBuffer(Buffer);
505 /// fake, non-empty buffer.
509 = llvm::MemoryBuffer::getMemBuffer("<<<INVALID BUFFER>>");
653 llvm::MemoryBuffer *Buffer,
658 const_cast<SrcMgr::ContentCache *>(IR)->replaceBuffer(Buffer, DoNotFree);
730 /// This function knows that the SourceLocation is in a local buffer, not a
821 /// This function knows that the SourceLocation is in a loaded buffer, not a
1114 return "<<<<INVALID BUFFER>>>>";
1116 llvm::MemoryBuffer *Buffer = Entry.getFile().getContentCache()->getBuffer(
1120 return Buffer->getBufferStart() + (CharDataInvalid? 0 : LocInfo.second);
1136 // It is okay to request a position just past the end of the buffer.
1203 MemoryBuffer *Buffer = FI->getBuffer(Diag, SM, SourceLocation(), &Invalid);
1214 const unsigned char *Buf = (const unsigned char *)Buffer->getBufferStart();
1215 const unsigned char *End = (const unsigned char *)Buffer->getBufferEnd();
1307 // If this is the first use of line information for this buffer, compute the
1432 /// Return the filename or buffer identifier of the buffer the location is in.
1720 // checks for possible buffer underruns.
1744 // If this is the first use of line information for this buffer, compute the
1760 llvm::MemoryBuffer *Buffer = Content->getBuffer(Diag, *this);
1762 const char *Buf = Buffer
1763 unsigned BufLength = Buffer->getBufferSize() - FilePos;
2088 // This can happen if a location is in a built-ins buffer.