Lines Matching refs:FromFile
91 void OutputContentUpTo(const MemoryBufferRef &FromFile, unsigned &WriteFrom,
95 const MemoryBufferRef &FromFile, StringRef EOL,
261 static StringRef DetectEOL(const MemoryBufferRef &FromFile) { in DetectEOL() argument
265 const char *Pos = strchr(FromFile.getBufferStart(), '\n'); in DetectEOL()
268 if (Pos - 1 >= FromFile.getBufferStart() && Pos[-1] == '\r') in DetectEOL()
270 if (Pos + 1 < FromFile.getBufferEnd() && Pos[1] == '\r') in DetectEOL()
276 Optional<MemoryBufferRef> FromFile = *SM.getBufferOrNone(SM.getMainFileID()); in detectMainFileEOL() local
277 assert(FromFile); in detectMainFileEOL()
278 if (!FromFile) in detectMainFileEOL()
280 MainEOL = DetectEOL(*FromFile); in detectMainFileEOL()
285 void InclusionRewriter::OutputContentUpTo(const MemoryBufferRef &FromFile, in OutputContentUpTo() argument
291 if (FromFile == PredefinesBuffer) { in OutputContentUpTo()
301 LocalEOL[0] == (FromFile.getBufferStart() + WriteTo)[-1] && in OutputContentUpTo()
302 LocalEOL[1] == (FromFile.getBufferStart() + WriteTo)[0]) in OutputContentUpTo()
305 StringRef TextToWrite(FromFile.getBufferStart() + WriteFrom, in OutputContentUpTo()
338 const MemoryBufferRef &FromFile, in CommentOutDirective() argument
341 OutputContentUpTo(FromFile, NextToWrite, in CommentOutDirective()
348 if (FromFile == PredefinesBuffer) { in CommentOutDirective()
353 OutputContentUpTo(FromFile, NextToWrite, in CommentOutDirective()
376 MemoryBufferRef FromFile; in Process() local
381 FromFile = *B; in Process()
383 StringRef FileName = FromFile.getBufferIdentifier(); in Process()
384 Lexer RawLex(FileId, FromFile, PP.getSourceManager(), PP.getLangOpts()); in Process()
387 StringRef LocalEOL = DetectEOL(FromFile); in Process()
421 CommentOutDirective(RawLex, HashToken, FromFile, LocalEOL, NextToWrite, in Process()
456 CommentOutDirective(RawLex, HashToken, FromFile, LocalEOL, in Process()
464 CommentOutDirective(RawLex, HashToken, FromFile, LocalEOL, in Process()
475 OutputContentUpTo(FromFile, NextToWrite, in Process()
491 OutputContentUpTo(FromFile, NextToWrite, in Process()
514 OutputContentUpTo(FromFile, NextToWrite, in Process()
530 OutputContentUpTo(FromFile, NextToWrite, in Process()