Lines Matching defs:File
5 // This file is distributed under the University of Illinois Open Source
10 // This file implements the PTHLexer interface.
102 // Save the end-of-file token.
130 // If we hit the end of the file while parsing a preprocessor directive,
132 // then be the end of file.
172 // Read the token kind. Are we at the end of the file?
289 // handling a #included file. Just read the necessary data from the token
300 // PTH file lookup: map from strings to file data.
305 /// the PTH file.
361 assert(k.first == 0x1 && "Only file lookups can match!");
434 PTHManager *PTHManager::Create(StringRef file, DiagnosticsEngine &Diags) {
435 // Memory map the PTH file.
437 llvm::MemoryBuffer::getFile(file);
441 Diags.Report(diag::err_invalid_pth_file) << file;
444 std::unique_ptr<llvm::MemoryBuffer> File = std::move(FileOrErr.get());
449 // words at the end of the file.
450 const unsigned char *BufBeg = (const unsigned char*)File->getBufferStart();
451 const unsigned char *BufEnd = (const unsigned char*)File->getBufferEnd();
453 // Check the prologue of the file.
456 Diags.Report(diag::err_invalid_pth_file) << file;
467 ? "PTH file uses an older PTH format that is no longer supported"
468 : "PTH file uses a newer PTH format that cannot be read");
472 // Compute the address of the index table at the end of the PTH file.
476 file;
480 // Construct the file lookup table. This will be used for mapping from
487 Diags.Report(diag::err_invalid_pth_file) << file;
493 // Warn if the PTH file is empty. We still want to create a PTHManager
496 InvalidPTH(Diags, "PTH file contains no cached source data");
505 Diags.Report(diag::err_invalid_pth_file) << file;
515 Diags.Report(diag::err_invalid_pth_file) << file;
527 Diags.Report(diag::err_invalid_pth_file) << file;
542 InvalidPTH(Diags, "Could not allocate memory for processing PTH file");
547 // Compute the address of the original source file.
554 return new PTHManager(std::move(File), std::move(FL), IData,
561 // Look in the PTH file for the string data for the IdentifierInfo object.
602 // Lookup the FileEntry object in our file lookup data structure. It will
604 // the PTH file that contains cached tokens.
665 if (k.first /* File or Directory */) {
667 if (k.first == 0x1 /* File */) {
674 uint64_t File = endian::readNext<uint64_t, little, unaligned>(d);
676 llvm::sys::fs::UniqueID UniqueID(Device, File);
699 std::unique_ptr<vfs::File> *F,
701 // Do the lookup for the file's data in the PTH file.
704 // If we don't get a hit in the PTH file just forward to 'stat'.