• Home
  • Raw
  • Download

Lines Matching +full:- +full:filename

1 //===--- DependencyFile.cpp - Generate dependency file --------------------===//
8 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
54 StringRef Filename = in FileChanged() local
55 llvm::sys::path::remove_leading_dotslash(FE->getName()); in FileChanged()
57 DepCollector.maybeAddDependency(Filename, /*FromModule*/false, in FileChanged()
63 StringRef FileName, bool IsAngled, in InclusionDirective()
68 DepCollector.maybeAddDependency(FileName, /*FromModule*/false, in InclusionDirective()
85 StringRef Filename = Entry.getName(); in moduleMapFileRead() local
86 DepCollector.maybeAddDependency(Filename, /*FromModule*/false, in moduleMapFileRead()
100 void visitModuleFile(StringRef Filename, in visitModuleFile()
102 DepCollector.maybeAddDependency(Filename, /*FromModule*/true, in visitModuleFile()
106 bool visitInputFile(StringRef Filename, bool IsSystem, in visitInputFile()
111 DepCollector.maybeAddDependency(Filename, /*FromModule*/true, IsSystem, in visitInputFile()
118 void DependencyCollector::maybeAddDependency(StringRef Filename, bool FromModule, in maybeAddDependency() argument
121 if (Seen.insert(Filename).second && in maybeAddDependency()
122 sawDependency(Filename, FromModule, IsSystem, IsModuleFile, IsMissing)) in maybeAddDependency()
123 Dependencies.push_back(Filename); in maybeAddDependency()
126 static bool isSpecialFilename(StringRef Filename) { in isSpecialFilename() argument
127 return llvm::StringSwitch<bool>(Filename) in isSpecialFilename()
128 .Case("<built-in>", true) in isSpecialFilename()
133 bool DependencyCollector::sawDependency(StringRef Filename, bool FromModule, in sawDependency() argument
136 return !isSpecialFilename(Filename) && in sawDependency()
167 bool FileMatchesDepCriteria(const char *Filename,
189 StringRef FileName, bool IsAngled,
198 void AddFilename(StringRef Filename);
223 void visitModuleFile(StringRef Filename,
225 bool visitInputFile(StringRef Filename, bool isSystem,
241 // Disable the "file not found" diagnostic if the -MG option was given. in CreateAndAttachToPreprocessor()
258 /// FileMatchesDepCriteria - Determine whether the given Filename should be
260 bool DFGImpl::FileMatchesDepCriteria(const char *Filename, in FileMatchesDepCriteria() argument
262 if (isSpecialFilename(Filename)) in FileMatchesDepCriteria()
281 SourceManager &SM = PP->getSourceManager(); in FileChanged()
287 StringRef Filename = FE->getName(); in FileChanged() local
288 if (!FileMatchesDepCriteria(Filename.data(), FileType)) in FileChanged()
291 AddFilename(llvm::sys::path::remove_leading_dotslash(Filename)); in FileChanged()
296 StringRef FileName, in InclusionDirective() argument
305 AddFilename(FileName); in InclusionDirective()
311 void DFGImpl::AddFilename(StringRef Filename) { in AddFilename() argument
312 if (FilesSet.insert(Filename).second) in AddFilename()
313 Files.push_back(Filename); in AddFilename()
316 /// Print the filename, with escaping or quoting that accommodates the three
327 /// filename, it should be escaped as well. (As a special case, $ is escaped
330 /// un-escapes characters in a filename but doesn't find a match, it will
334 /// characters in the original filename, but not escaping backslashes. The
341 /// A corner case that GCC gets only partly right is when the original filename
355 /// which is the actual filename specified by the include directive.
360 /// double-quotes to avoid misinterpreting them; see
361 /// https://msdn.microsoft.com/en-us/library/dd9y37ha.aspx for NMake info,
362 /// https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
363 /// for Windows file-naming info.
364 static void PrintFilename(raw_ostream &OS, StringRef Filename, in PrintFilename() argument
370 if (Filename.find_first_of(" #${}^!") != StringRef::npos) in PrintFilename()
371 OS << '\"' << Filename << '\"'; in PrintFilename()
373 OS << Filename; in PrintFilename()
377 for (unsigned i = 0, e = Filename.size(); i != e; ++i) { in PrintFilename()
378 if (Filename[i] == '#') // Handle '#' the broken gcc way. in PrintFilename()
380 else if (Filename[i] == ' ') { // Handle space correctly. in PrintFilename()
383 while (j > 0 && Filename[--j] == '\\') in PrintFilename()
385 } else if (Filename[i] == '$') // $ is escaped by $$. in PrintFilename()
387 OS << Filename[i]; in PrintFilename()
400 PP->getDiagnostics().Report(diag::err_fe_error_opening) << OutputFile in OutputDependencyFile()
414 unsigned N = I->length(); in OutputDependencyFile()
438 unsigned N = I->length(); in OutputDependencyFile()
461 bool DFGASTReaderListener::visitInputFile(llvm::StringRef Filename, in visitInputFile() argument
468 Parent.AddFilename(Filename); in visitInputFile()
472 void DFGASTReaderListener::visitModuleFile(llvm::StringRef Filename, in visitModuleFile() argument
475 Parent.AddFilename(Filename); in visitModuleFile()