/freebsd/contrib/llvm-project/clang/lib/Sema/ |
H A D | CheckExprLifetime.cpp | 214 IndirectLocalPath &Path; member 215 unsigned OldSize = Path.size(); 216 RevertToOldSizeRAII(IndirectLocalPath &Path) : Path(Path) {} in RevertToOldSizeRAII() 217 ~RevertToOldSizeRAII() { Path.resize(OldSize); } in ~RevertToOldSizeRAII() 220 using LocalVisitor = llvm::function_ref<bool(IndirectLocalPath &Path, Local L, 224 static bool isVarOnPath(IndirectLocalPath &Path, VarDecl *VD) { in isVarOnPath() argument 225 for (auto E : Path) in isVarOnPath() 231 static bool pathContainsInit(IndirectLocalPath &Path) { in pathContainsInit() argument 232 return llvm::any_of(Path, [=](IndirectLocalPathEntry E) { in pathContainsInit() 238 static void visitLocalsRetainedByInitializer(IndirectLocalPath &Path, [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/fuzzer/ |
H A D | FuzzerIOPosix.cpp | 27 bool IsFile(const std::string &Path) { in IsFile() argument 29 if (stat(Path.c_str(), &St)) in IsFile() 34 bool IsDirectory(const std::string &Path) { in IsDirectory() argument 36 if (stat(Path.c_str(), &St)) in IsDirectory() 41 size_t FileSize(const std::string &Path) { in FileSize() argument 43 if (stat(Path.c_str(), &St)) in FileSize() 48 std::string Basename(const std::string &Path) { in Basename() argument 49 size_t Pos = Path.rfind(GetSeparator()); in Basename() 50 if (Pos == std::string::npos) return Path; in Basename() 51 assert(Pos < Path.size()); in Basename() [all …]
|
H A D | FuzzerIO.cpp | 34 long GetEpoch(const std::string &Path) { in GetEpoch() argument 36 if (stat(Path.c_str(), &St)) in GetEpoch() 41 Unit FileToVector(const std::string &Path, size_t MaxSize, bool ExitOnError) { in FileToVector() argument 42 std::ifstream T(Path, std::ios::binary); in FileToVector() 44 Printf("No such directory: %s; exiting\n", Path.c_str()); in FileToVector() 61 std::string FileToString(const std::string &Path) { in FileToString() argument 62 std::ifstream T(Path, std::ios::binary); in FileToString() 67 void CopyFileToErr(const std::string &Path) { in CopyFileToErr() argument 68 Puts(FileToString(Path).c_str()); in CopyFileToErr() 71 void WriteToFile(const Unit &U, const std::string &Path) { in WriteToFile() argument [all …]
|
H A D | FuzzerIOWindows.cpp | 26 static bool IsFile(const std::string &Path, const DWORD &FileAttributes) { in IsFile() argument 35 CreateFileA(Path.c_str(), 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, in IsFile() 39 Printf("CreateFileA() failed for \"%s\" (Error code: %lu).\n", Path.c_str(), in IsFile() 47 Printf("GetFileType() failed for \"%s\" (Error code: %lu).\n", Path.c_str(), in IsFile() 62 bool IsFile(const std::string &Path) { in IsFile() argument 63 DWORD Att = GetFileAttributesA(Path.c_str()); in IsFile() 67 Path.c_str(), GetLastError()); in IsFile() 71 return IsFile(Path, Att); in IsFile() 79 bool IsDirectory(const std::string &Path) { in IsDirectory() argument 80 DWORD Att = GetFileAttributesA(Path.c_str()); in IsDirectory() [all …]
|
H A D | FuzzerIO.h | 18 long GetEpoch(const std::string &Path); 20 Unit FileToVector(const std::string &Path, size_t MaxSize = 0, 23 std::string FileToString(const std::string &Path); 25 void CopyFileToErr(const std::string &Path); 27 void WriteToFile(const uint8_t *Data, size_t Size, const std::string &Path); 29 void WriteToFile(const std::string &Data, const std::string &Path); 30 void WriteToFile(const Unit &U, const std::string &Path); 32 void AppendToFile(const uint8_t *Data, size_t Size, const std::string &Path); 33 void AppendToFile(const std::string &Data, const std::string &Path); 35 void ReadDirToVectorOfUnits(const char *Path, std::vector<Unit> *V, long *Epoch, [all …]
|
/freebsd/sys/contrib/dev/acpica/common/ |
H A D | dmextern.c | 215 char *Path); 225 char **Path); 229 char *Path, 244 char *Path); 248 char *Path, 255 char *Path); 305 char *Path) in AcpiDmNormalizeParentPrefix() argument 343 while (Node && (*Path == (UINT8) AML_PARENT_PREFIX)) in AcpiDmNormalizeParentPrefix() 346 Path++; in AcpiDmNormalizeParentPrefix() 362 Length = (strlen (ParentPath) + strlen (Path) + 1); in AcpiDmNormalizeParentPrefix() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Testing/Support/ |
H A D | SupportHelpers.h | 114 SmallString<128> Path; variable 125 EC = llvm::sys::fs::createUniqueDirectory(Name, Path); 128 std::string UnresolvedPath(Path.str()); 129 EC = llvm::sys::fs::real_path(UnresolvedPath, Path); 132 Path = Name; 133 EC = llvm::sys::fs::create_directory(Path); 136 Path.clear(); 141 if (!Path.empty()) { in ~TempDir() 142 EXPECT_FALSE(llvm::sys::fs::remove_directories(Path.str())); in ~TempDir() 153 StringRef path() const { return Path; } in path() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/InstallAPI/ |
H A D | DirectoryScanner.cpp | 36 SmallString<PATH_MAX> Path(Directory); in scanForUnwrappedLibraries() local 37 sys::path::append(Path, Sub); in scanForUnwrappedLibraries() 38 return FM.getOptionalDirectoryRef(Path); in scanForUnwrappedLibraries() 66 static bool isFramework(StringRef Path) { in isFramework() argument 67 while (Path.back() == '/') in isFramework() 68 Path = Path.slice(0, Path.size() - 1); in isFramework() 70 return llvm::StringSwitch<bool>(llvm::sys::path::extension(Path)) in isFramework() 76 DirectoryScanner::getOrCreateLibrary(StringRef Path, in getOrCreateLibrary() argument 78 if (Path.consume_front(RootPath) && Path.empty()) in getOrCreateLibrary() 79 Path = "/"; in getOrCreateLibrary() [all …]
|
H A D | Library.cpp | 26 StringRef Path = BaseDirectory; in getName() local 29 while (!Path.empty()) { in getName() 30 if (Path.ends_with(".framework")) in getName() 31 return sys::path::filename(Path); in getName() 32 Path = sys::path::parent_path(Path); in getName() 36 Path = BaseDirectory; in getName() 37 return sys::path::filename(Path.rtrim("/")); in getName()
|
/freebsd/contrib/llvm-project/llvm/lib/Support/ |
H A D | FileCollector.cpp | 34 static bool isCaseSensitivePath(StringRef Path) { in isCaseSensitivePath() argument 35 SmallString<256> TmpDest = Path, UpperDest, RealDest; in isCaseSensitivePath() 38 if (sys::fs::real_path(Path, TmpDest)) in isCaseSensitivePath() 40 Path = TmpDest; in isCaseSensitivePath() 46 UpperDest = Path.upper(); in isCaseSensitivePath() 47 if (!sys::fs::real_path(UpperDest, RealDest) && Path == RealDest) in isCaseSensitivePath() 59 SmallVectorImpl<char> &Path) { in updateWithRealPath() argument 60 StringRef SrcPath(Path.begin(), Path.size()); in updateWithRealPath() 87 Path.swap(RealPath); in updateWithRealPath() 91 static void makeAbsolute(SmallVectorImpl<char> &Path) { in makeAbsolute() argument [all …]
|
H A D | VirtualFileSystem.cpp | 128 std::error_code FileSystem::makeAbsolute(SmallVectorImpl<char> &Path) const { in makeAbsolute() 129 if (llvm::sys::path::is_absolute(Path)) in makeAbsolute() 136 llvm::sys::fs::make_absolute(WorkingDir.get(), Path); in makeAbsolute() 140 std::error_code FileSystem::getRealPath(const Twine &Path, in getRealPath() argument 145 std::error_code FileSystem::isLocal(const Twine &Path, bool &Result) { in isLocal() argument 149 bool FileSystem::exists(const Twine &Path) { in exists() argument 150 auto Status = status(Path); in exists() 173 static bool pathHasTraversal(StringRef Path) { in pathHasTraversal() argument 176 for (StringRef Comp : llvm::make_range(path::begin(Path), path::end(Path))) in pathHasTraversal() 214 void setPath(const Twine &Path) override; [all …]
|
H A D | FileOutputBuffer.cpp | 35 OnDiskBuffer(StringRef Path, fs::TempFile Temp, fs::mapped_file_region Buf) in OnDiskBuffer() 36 : FileOutputBuffer(Path), Buffer(std::move(Buf)), Temp(std::move(Temp)) {} 78 InMemoryBuffer(StringRef Path, MemoryBlock Buf, std::size_t BufSize, in InMemoryBuffer() 80 : FileOutputBuffer(Path), Buffer(Buf), BufferSize(BufSize), in getBufferStart() 118 createInMemoryBuffer(StringRef Path, size_t Size, unsigned Mode) { in createInMemoryBuffer() 124 return std::make_unique<InMemoryBuffer>(Path, MB, Size, Mode); 128 createOnDiskBuffer(StringRef Path, size_t Size, unsigned Mode) { in createOnDiskBuffer() 130 fs::TempFile::create(Path + ".tmp%%%%%%%", Mode); in createOnDiskBuffer() 150 return createInMemoryBuffer(Path, Size, Mode); in createOnDiskBuffer() 153 return std::make_unique<OnDiskBuffer>(Path, st in createOnDiskBuffer() 34 OnDiskBuffer(StringRef Path,fs::TempFile Temp,fs::mapped_file_region Buf) OnDiskBuffer() argument 75 InMemoryBuffer(StringRef Path,MemoryBlock Buf,std::size_t BufSize,unsigned Mode) InMemoryBuffer() argument 115 createInMemoryBuffer(StringRef Path,size_t Size,unsigned Mode) createInMemoryBuffer() argument 125 createOnDiskBuffer(StringRef Path,size_t Size,unsigned Mode) createOnDiskBuffer() argument 156 create(StringRef Path,size_t Size,unsigned Flags) create() argument [all...] |
H A D | Path.cpp | 229 i.Path = path; in begin() 238 i.Path = path; in end() 244 assert(Position < Path.size() && "Tried to increment past end!"); in operator ++() 250 if (Position == Path.size()) { in operator ++() 261 if (is_separator(Path[Position], S)) { in operator ++() 266 Component = Path.substr(Position, 1); in operator ++() 271 while (Position != Path.size() && is_separator(Path[Position], S)) { in operator ++() 276 if (Position == Path.size() && Component != "/") { in operator ++() 284 size_t end_pos = Path.find_first_of(separators(S), Position); in operator ++() 285 Component = Path.slice(Position, end_pos); in operator ++() [all …]
|
H A D | TarWriter.cpp | 101 static void writePaxHeader(raw_fd_ostream &OS, StringRef Path) { in writePaxHeader() argument 104 std::string PaxAttr = formatPax("path", Path); in writePaxHeader() 127 static bool splitUstar(StringRef Path, StringRef &Prefix, StringRef &Name) { in splitUstar() argument 128 if (Path.size() < sizeof(UstarHeader::Name)) { in splitUstar() 130 Name = Path; in splitUstar() 144 size_t Sep = Path.rfind('/', MaxPrefix + 1); in splitUstar() 147 if (Path.size() - Sep - 1 >= sizeof(UstarHeader::Name)) in splitUstar() 150 Prefix = Path.substr(0, Sep); in splitUstar() 151 Name = Path.substr(Sep + 1); in splitUstar() 184 void TarWriter::append(StringRef Path, StringRef Data) { in append() argument [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/TextAPI/ |
H A D | Utils.cpp | 20 void llvm::MachO::replace_extension(SmallVectorImpl<char> &Path, in replace_extension() argument 22 StringRef P(Path.begin(), Path.size()); in replace_extension() 27 sys::path::replace_extension(Path, Extension); in replace_extension() 38 Path.push_back('.'); in replace_extension() 41 Path.append(Ext.begin(), Ext.end()); in replace_extension() 44 std::error_code llvm::MachO::shouldSkipSymLink(const Twine &Path, in shouldSkipSymLink() argument 48 auto P = Path.toNullTerminatedStringRef(Storage); in shouldSkipSymLink() 110 bool llvm::MachO::isPrivateLibrary(StringRef Path, bool IsSymLink) { in isPrivateLibrary() argument 112 Path.consume_front(MACCATALYST_PREFIX_PATH); in isPrivateLibrary() 113 Path.consume_front(DRIVERKIT_PREFIX_PATH); in isPrivateLibrary() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/DirectoryWatcher/mac/ |
H A D | DirectoryWatcher-mac.cpp | 114 StringRef Path = ((const char **)EventPaths)[i]; in eventStreamCallback() local 125 Path == ctx->WatchedPath) { in eventStreamCallback() 136 llvm::sys::path::filename(Path)); in eventStreamCallback() 139 if (!getFileStatus(Path).has_value()) { in eventStreamCallback() 141 llvm::sys::path::filename(Path)); in eventStreamCallback() 144 llvm::sys::path::filename(Path)); in eventStreamCallback() 161 StringRef Path, in createFSEventStream() argument 164 if (Path.empty()) in createFSEventStream() 171 CFStringCreateWithBytes(nullptr, (const UInt8 *)Path.data(), in createFSEventStream() 172 Path.size(), kCFStringEncodingUTF8, false); in createFSEventStream() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
H A D | VirtualFileSystem.h | 143 virtual void setPath(const Twine &Path) {} in setPath() argument 149 std::string Path; variable 154 directory_entry(std::string Path, llvm::sys::fs::file_type Type) in directory_entry() argument 155 : Path(std::move(Path)), Type(Type) {} in directory_entry() 157 llvm::StringRef path() const { return Path; } in path() 235 recursive_directory_iterator(FileSystem &FS, const Twine &Path, 272 virtual llvm::ErrorOr<Status> status(const Twine &Path) = 0; 276 openFileForRead(const Twine &Path) = 0; 291 virtual std::error_code setCurrentWorkingDirectory(const Twine &Path) = 0; 299 virtual std::error_code getRealPath(const Twine &Path, [all …]
|
/freebsd/contrib/llvm-project/clang/lib/APINotes/ |
H A D | APINotesManager.cpp | 144 llvm::SmallString<128> Path(Directory.getName()); in findAPINotesFile() local 149 llvm::sys::path::append(Path, llvm::Twine(Basename) + Suffix + "." + in findAPINotesFile() 151 return FM.getOptionalFileRef(Path, /*Open*/ true); in findAPINotesFile() 158 llvm::SmallString<128> Path(FrameworkPath); in loadFrameworkAPINotes() local 159 unsigned FrameworkNameLength = Path.size(); in loadFrameworkAPINotes() 164 llvm::sys::path::append(Path, "APINotes"); in loadFrameworkAPINotes() 165 llvm::sys::path::append(Path, (llvm::Twine(FrameworkName) + Suffix + "." + in loadFrameworkAPINotes() 169 auto APINotesFile = FM.getOptionalFileRef(Path); in loadFrameworkAPINotes() 174 Path.resize(FrameworkNameLength); in loadFrameworkAPINotes() 175 llvm::sys::path::append(Path, Public ? "Headers" : "PrivateHeaders"); in loadFrameworkAPINotes() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/WindowsDriver/ |
H A D | MSVCPaths.cpp | 100 std::optional<llvm::StringRef> WinSysRoot, std::string &Path, int &Major, in getWindowsSDKDirViaCommandLine() argument 117 Path = std::string(SDKPath); in getWindowsSDKDirViaCommandLine() 119 Path = WinSdkDir->str(); in getWindowsSDKDirViaCommandLine() 125 } else if (getWindows10SDKVersionFromPath(VFS, Path, Version)) { in getWindowsSDKDirViaCommandLine() 360 SmallString<256> Path(VCToolChainPath); in getSubDirectoryPath() local 362 sys::path::append(Path, SubdirParent); in getSubDirectoryPath() 378 sys::path::append(Path, "bin", HostName, SubdirName); in getSubDirectoryPath() 380 sys::path::append(Path, "bin", SubdirName); in getSubDirectoryPath() 384 sys::path::append(Path, IncludeName); in getSubDirectoryPath() 387 sys::path::append(Path, "lib", SubdirName); in getSubDirectoryPath() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/Tooling/ |
H A D | FileMatchTrie.cpp | 64 if (Path.empty()) { in insert() 66 Path = std::string(NewPath); in insert() 71 if (NewPath == Path) in insert() 75 StringRef(Path).drop_back(ConsumedLength))); in insert() 76 Children[Element].Path = Path; in insert() 112 if (llvm::sys::path::filename(Path) == in findEquivalent() 114 Comparator.equivalent(StringRef(Path), FileName)) in findEquivalent() 115 return StringRef(Path); in findEquivalent() 156 if (Path.empty()) in getAll() 159 Results.push_back(StringRef(Path)); in getAll() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Object/ |
H A D | BuildID.cpp | 70 SmallString<128> Path{Directory}; in fetch() local 71 sys::path::append(Path, ".build-id", in fetch() 74 Path += ".debug"; in fetch() 75 return Path; in fetch() 78 SmallString<128> Path = GetDebugPath( in fetch() local 87 if (llvm::sys::fs::exists(Path)) in fetch() 88 return std::string(Path); in fetch() 92 SmallString<128> Path = GetDebugPath(Directory); in fetch() local 93 if (llvm::sys::fs::exists(Path)) in fetch() 94 return std::string(Path); in fetch()
|
/freebsd/contrib/llvm-project/clang/lib/Driver/ToolChains/ |
H A D | MipsLinux.cpp | 59 for (const auto &Path : Callback(SelectedMultilibs.back())) in AddClangSystemIncludeArgs() local 60 addExternCSystemIncludeIfExists(DriverArgs, CC1Args, D.Dir + Path); in AddClangSystemIncludeArgs() 98 for (std::string Path : Callback(SelectedMultilibs.back())) { in addLibCxxIncludePaths() local 99 Path = getDriver().Dir + Path + "/c++/v1"; in addLibCxxIncludePaths() 100 if (llvm::sys::fs::exists(Path)) { in addLibCxxIncludePaths() 101 addSystemInclude(DriverArgs, CC1Args, Path); in addLibCxxIncludePaths() 123 SmallString<128> Path(getDriver().ResourceDir); in getCompilerRT() local 124 llvm::sys::path::append(Path, SelectedMultilibs.back().osSuffix(), "lib" + LibSuffix, in getCompilerRT() 139 Path, Twine("libclang_rt." + Component + "-" + "mips" + Suffix)); in getCompilerRT() 140 return std::string(Path); in getCompilerRT()
|
H A D | HIPSPV.cpp | 40 StringRef Path = Args.getLastArgValue(options::OPT_hipspv_pass_plugin_EQ); in findPassPlugin() local 41 if (!Path.empty()) { in findPassPlugin() 42 if (llvm::sys::fs::exists(Path)) in findPassPlugin() 43 return Path.str(); in findPassPlugin() 44 D.Diag(diag::err_drv_no_such_file) << Path; in findPassPlugin() 156 DriverArgs.MakeArgString(BCFile.Path)}); in addClangTargetOptions() 215 for (auto Path : HipDeviceLibPathArgs) in getDeviceLibs() local 216 LibraryPaths.push_back(DriverArgs.MakeArgString(Path)); in getDeviceLibs() 220 SmallString<128> Path(HipPath); in getDeviceLibs() local 221 llvm::sys::path::append(Path, "lib", "hip-device-lib"); in getDeviceLibs() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/ |
H A D | BlockCoverageInference.cpp | 187 auto getNextOnPath = [&](BlockSet &Path) -> const BasicBlock * { in findDependencies() argument 188 assert(Path.size()); in findDependencies() 189 auto &Neighbors = AdjacencyList[Path.back()]; in findDependencies() 190 if (Path.size() == 1) { in findDependencies() 197 assert(Path.size() >= 2); in findDependencies() 198 return Path.count(Neighbors[0]) ? Neighbors[1] : Neighbors[0]; in findDependencies() 209 BlockSet Path; in findDependencies() local 210 Path.insert(&BB); in findDependencies() 211 while (const BasicBlock *Next = getNextOnPath(Path)) in findDependencies() 212 Path.insert(Next); in findDependencies() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/Basic/ |
H A D | FileSystemStatCache.cpp | 34 FileSystemStatCache::get(StringRef Path, llvm::vfs::Status &Status, in get() argument 43 RetCode = Cache->getStat(Path, Status, isFile, F, FS); in get() 47 llvm::ErrorOr<llvm::vfs::Status> StatusOrErr = FS.status(Path); in get() 61 auto OwnedFile = FS.openFileForRead(Path); in get() 102 MemorizeStatCalls::getStat(StringRef Path, llvm::vfs::Status &Status, in getStat() argument 106 auto err = get(Path, Status, isFile, F, nullptr, FS); in getStat() 116 if (!Status.isDirectory() || llvm::sys::path::is_absolute(Path)) in getStat() 117 StatCalls[Path] = Status; in getStat()
|