Home | History | Annotate | Download | only in Rewrite

Lines Matching defs:FromFile

75   void OutputContentUpTo(const MemoryBuffer &FromFile,
80 const MemoryBuffer &FromFile, StringRef EOL,
214 /// Detect the likely line ending style of \p FromFile by examining the first
216 static StringRef DetectEOL(const MemoryBuffer &FromFile) {
220 const char *Pos = strchr(FromFile.getBufferStart(), '\n');
223 if (Pos - 1 >= FromFile.getBufferStart() && Pos[-1] == '\r')
225 if (Pos + 1 < FromFile.getBufferEnd() && Pos[1] == '\r')
232 const MemoryBuffer &FromFile = *SM.getBuffer(SM.getMainFileID(), &Invalid);
236 MainEOL = DetectEOL(FromFile);
239 /// Writes out bytes from \p FromFile, starting at \p NextToWrite and ending at
241 void InclusionRewriter::OutputContentUpTo(const MemoryBuffer &FromFile,
247 if (&FromFile == PredefinesBuffer) {
257 LocalEOL[0] == (FromFile.getBufferStart() + WriteTo)[-1] &&
258 LocalEOL[1] == (FromFile.getBufferStart() + WriteTo)[0])
261 StringRef TextToWrite(FromFile.getBufferStart() + WriteFrom,
287 /// Print characters from \p FromFile starting at \p NextToWrite up until the
291 /// through the \p FromFile buffer.
294 const MemoryBuffer &FromFile,
297 OutputContentUpTo(FromFile, NextToWrite,
304 if (&FromFile == PredefinesBuffer) {
309 OutputContentUpTo(FromFile, NextToWrite,
407 const MemoryBuffer &FromFile = *SM.getBuffer(FileId, &Invalid);
409 const char *FileName = FromFile.getBufferIdentifier();
410 Lexer RawLex(FileId, &FromFile, PP.getSourceManager(), PP.getLangOpts());
413 StringRef LocalEOL = DetectEOL(FromFile);
447 CommentOutDirective(RawLex, HashToken, FromFile, LocalEOL, NextToWrite,
477 CommentOutDirective(RawLex, HashToken, FromFile, LocalEOL,
485 CommentOutDirective(RawLex, HashToken, FromFile, LocalEOL,
526 OutputContentUpTo(FromFile, NextToWrite, SM.getFileOffset(Loc),
529 OutputContentUpTo(FromFile, NextToWrite,
537 OutputContentUpTo(FromFile, NextToWrite,
556 OutputContentUpTo(FromFile, NextToWrite,
571 OutputContentUpTo(FromFile, NextToWrite,