Lines Matching defs:FromFile

77   void OutputContentUpTo(const MemoryBuffer &FromFile,
82 const MemoryBuffer &FromFile, StringRef EOL,
202 /// Detect the likely line ending style of \p FromFile by examining the first
204 static StringRef DetectEOL(const MemoryBuffer &FromFile) {
207 const char *Pos = strchr(FromFile.getBufferStart(), '\n');
210 if (Pos + 1 < FromFile.getBufferEnd() && Pos[1] == '\r')
212 if (Pos - 1 >= FromFile.getBufferStart() && Pos[-1] == '\r')
217 /// Writes out bytes from \p FromFile, starting at \p NextToWrite and ending at
219 void InclusionRewriter::OutputContentUpTo(const MemoryBuffer &FromFile,
225 if (&FromFile == PredefinesBuffer) {
230 OS.write(FromFile.getBufferStart() + WriteFrom, WriteTo - WriteFrom);
232 Line += std::count(FromFile.getBufferStart() + WriteFrom,
233 FromFile.getBufferStart() + WriteTo, '\n');
235 char LastChar = FromFile.getBufferStart()[WriteTo - 1];
242 /// Print characters from \p FromFile starting at \p NextToWrite up until the
246 /// through the \p FromFile buffer.
249 const MemoryBuffer &FromFile,
252 OutputContentUpTo(FromFile, NextToWrite,
259 OutputContentUpTo(FromFile, NextToWrite,
351 const MemoryBuffer &FromFile = *SM.getBuffer(FileId, &Invalid);
354 const char *FileName = FromFile.getBufferIdentifier();
355 Lexer RawLex(FileId, &FromFile, PP.getSourceManager(), PP.getLangOpts());
358 StringRef EOL = DetectEOL(FromFile);
372 if (FromFile.getBuffer().startswith("\xEF\xBB\xBF"))
392 CommentOutDirective(RawLex, HashToken, FromFile, EOL, NextToWrite,
419 CommentOutDirective(RawLex, HashToken, FromFile, EOL,
427 CommentOutDirective(RawLex, HashToken, FromFile, EOL,
467 OutputContentUpTo(FromFile, NextToWrite, SM.getFileOffset(Loc),
470 OutputContentUpTo(FromFile, NextToWrite,
478 OutputContentUpTo(FromFile, NextToWrite,
498 FromFile, NextToWrite,
512 OutputContentUpTo(FromFile, NextToWrite,