/// getFile - Return an existing FileEntry with the given name if /// there is already one; otherwise create and return a /// default-constructed FileEntry. FileEntry &getFile(const char *Name, const struct stat & /*StatBuf*/) { std::string FullPath(GetFullPath(Name)); // Lowercase string because Windows filesystem is case insensitive. FullPath = StringRef(FullPath).lower(); return UniqueFiles.GetOrCreateValue(FullPath).getValue(); }
FileEntry &getFile(const char *Name, struct stat &StatBuf) { std::string FullPath(GetFullPath(Name)); // LowercaseString because Windows filesystem is case insensitive. FullPath = llvm::LowercaseString(FullPath); return UniqueFiles.GetOrCreateValue(FullPath).getValue(); }
FileEntry &getFile(const char *Name, struct stat &StatBuf) { std::string FullPath(GetFullPath(Name)); return UniqueFiles.GetOrCreateValue( FullPath.c_str(), FullPath.c_str() + FullPath.size() ).getValue(); }
DirectoryEntry &getDirectory(const char *Name, struct stat &StatBuf) { std::string FullPath(GetFullPath(Name)); return UniqueDirs.GetOrCreateValue(FullPath).getValue(); }