Home | History | Annotate | Download | only in Frontend

Lines Matching defs:File

5 // This file is distributed under the University of Illinois Open Source
84 /// \brief The file in which the precompiled preamble is stored.
94 /// \brief Erase the preamble file.
97 /// \brief Erase temporary files and the preamble file.
167 for (StringRef File : TemporaryFiles)
168 llvm::sys::fs::remove(File);
235 // If we loaded from an AST file, balance out the BeginSourceFile call.
242 // Clean up the temporary files and the preamble file.
723 // AST file as needed.
755 // Tell the diagnostic client that we have started a source file.
1029 /// Parse the source file into a translation unit using the given compiler
1072 "Invocation must have exactly one source file!");
1102 // Create a file manager object to provide access to and cache the filesystem.
1108 // If the main file has been overridden due to the use of a preamble,
1171 // FIXME: This is a hack so that we can override the preamble file during
1184 /// \brief Compute the preamble for the main file, providing the source buffer
1185 /// that corresponds to the main file along with a pair (bytes, start-of-line)
1192 // Try to determine if the main file has been remapped, either from the
1193 // command line (to another file) or directly through the compiler invocation
1200 // Check whether there is a file-file remapping of the main file
1214 // Check whether there is a file-buffer remapping. It supercedes the
1215 // file-file remapping.
1229 // If the main source file was not remapped, load it now.
1320 /// the source file.
1322 /// This routine will compute the preamble of the main source file. If a
1337 /// buffer that should be used in place of the main file when doing so.
1367 // the main-file buffer within the precompiled preamble to fit the
1368 // new main file.
1388 // If we can't stat the file we're remapping to, assume that something
1419 // If we can't stat the file, assume that something horrible happened.
1427 // This file was remapped; check whether the newly-mapped file
1434 // The file was not remapped; check whether it has changed on disk.
1480 // Create a temporary file for the precompiled preamble. In rare
1504 // Remap the main source file to the preamble buffer.
1547 "Invocation must have exactly one source file!");
1566 // Create a file manager object to provide access to and cache the filesystem.
1621 const FileEntry *File = Clang->getFileManager().getFile(Filename);
1622 if (!File || File == SourceMgr.getFileEntryForID(SourceMgr.getMainFileID()))
1624 if (time_t ModTime = File->getModificationTime()) {
1625 FilesInPreamble[File->getName()] = PreambleFileHash::createForFile(
1626 File->getSize(), ModTime);
1628 llvm::MemoryBuffer *Buffer = SourceMgr.getMemoryBufferForFile(File);
1629 FilesInPreamble[File->getName()] =
1772 // We'll manage file buffers ourselves.
1805 "Invocation must have exactly one source file!");
1817 // Create a file manager object to provide access to and cache the filesystem.
1880 // We'll manage file buffers ourselves.
2050 // If we have a preamble file lying around, or if we might try to
2318 StringRef File, unsigned Line, unsigned Column,
2330 CompletionTimer.setOutput("Code completion @ " + File + ":" +
2348 FrontendOpts.CodeCompletionAt.FileName = File;
2391 "Invocation must have exactly one source file!");
2398 // Use the source and file managers that we were given.
2418 // point is within the main file, after the end of the precompiled
2422 std::string CompleteFilePath(File);
2436 // If the main file has been overridden due to the use of a preamble,
2465 bool ASTUnit::Save(StringRef File) {
2469 // Write to a temporary file and later rename it to the actual file, to avoid
2472 TempPath = File;
2479 // unconditionally create a stat cache when we parse the file?
2489 if (llvm::sys::fs::rename(TempPath, File)) {
2590 // We only keep track of the file-level declarations of each file.
2619 void ASTUnit::findFileRegionDecls(FileID File, unsigned Offset, unsigned Length,
2621 if (File.isInvalid())
2624 if (SourceMgr->isLoadedFileID(File)) {
2626 return Ctx->getExternalSource()->FindFileRegionDecls(File, Offset, Length,
2630 FileDeclsTy::iterator I = FileDecls.find(File);
2662 SourceLocation ASTUnit::getLocation(const FileEntry *File,
2665 SourceLocation Loc = SM.translateFileLineCol(File, Line, Col);
2669 SourceLocation ASTUnit::getLocation(const FileEntry *File,
2672 SourceLocation FileLoc = SM.translateFileLineCol(File, 1, 1);
2677 /// the corresponding local location of the main file, otherwise it returns
2697 /// \brief If \arg Loc is a local location of the main file but inside the
2821 return Mod->File;