| /freebsd/contrib/llvm-project/compiler-rt/lib/fuzzer/ |
| H A D | FuzzerIOPosix.cpp | 28 bool IsFile(const std::string &Path) { in IsFile() argument 30 if (stat(Path.c_str(), &St)) in IsFile() 35 bool IsDirectory(const std::string &Path) { in IsDirectory() argument 37 if (stat(Path.c_str(), &St)) in IsDirectory() 42 size_t FileSize(const std::string &Path) { in FileSize() argument 44 if (stat(Path.c_str(), &St)) in FileSize() 49 std::string Basename(const std::string &Path) { in Basename() argument 50 size_t Pos = Path.rfind(GetSeparator()); in Basename() 51 if (Pos == std::string::npos) return Path; in Basename() 52 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/contrib/llvm-project/clang/lib/Sema/ |
| H A D | CheckExprLifetime.cpp | 226 IndirectLocalPath &Path; member 227 unsigned OldSize = Path.size(); 228 RevertToOldSizeRAII(IndirectLocalPath &Path) : Path(Path) {} in RevertToOldSizeRAII() 229 ~RevertToOldSizeRAII() { Path.resize(OldSize); } in ~RevertToOldSizeRAII() 232 using LocalVisitor = llvm::function_ref<bool(IndirectLocalPath &Path, Local L, 236 static bool isVarOnPath(const IndirectLocalPath &Path, VarDecl *VD) { in isVarOnPath() argument 237 for (auto E : Path) in isVarOnPath() 243 static bool pathContainsInit(const IndirectLocalPath &Path) { in pathContainsInit() argument 244 return llvm::any_of(Path, [=](IndirectLocalPathEntry E) { in pathContainsInit() 250 static void visitLocalsRetainedByInitializer(IndirectLocalPath &Path, [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 | 35 SmallString<PATH_MAX> Path(Directory); in scanForUnwrappedLibraries() local 36 sys::path::append(Path, Sub); in scanForUnwrappedLibraries() 37 return FM.getOptionalDirectoryRef(Path); in scanForUnwrappedLibraries() 65 static bool isFramework(StringRef Path) { in isFramework() argument 66 while (Path.back() == '/') in isFramework() 67 Path = Path.slice(0, Path.size() - 1); in isFramework() 69 return llvm::StringSwitch<bool>(llvm::sys::path::extension(Path)) in isFramework() 75 DirectoryScanner::getOrCreateLibrary(StringRef Path, in getOrCreateLibrary() argument 77 if (Path.consume_front(RootPath) && Path.empty()) in getOrCreateLibrary() 78 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 | FileOutputBuffer.cpp | 35 OnDiskBuffer(StringRef Path, fs::TempFile Temp, fs::mapped_file_region Buf) in OnDiskBuffer() argument 36 : FileOutputBuffer(Path), Buffer(std::move(Buf)), Temp(std::move(Temp)) {} in OnDiskBuffer() 78 InMemoryBuffer(StringRef Path, MemoryBlock Buf, std::size_t BufSize, in InMemoryBuffer() argument 80 : FileOutputBuffer(Path), Buffer(Buf), BufferSize(BufSize), in InMemoryBuffer() 118 createInMemoryBuffer(StringRef Path, size_t Size, unsigned Mode) { in createInMemoryBuffer() argument 124 return std::make_unique<InMemoryBuffer>(Path, MB, Size, Mode); in createInMemoryBuffer() 128 createOnDiskBuffer(StringRef Path, size_t Size, unsigned Mode) { in createOnDiskBuffer() argument 130 fs::TempFile::create(Path + ".tmp%%%%%%%", Mode); in createOnDiskBuffer() 150 return createInMemoryBuffer(Path, Size, Mode); in createOnDiskBuffer() 153 return std::make_unique<OnDiskBuffer>(Path, std::move(File), in createOnDiskBuffer() [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 | Path.cpp | 228 i.Path = path; in begin() 237 i.Path = path; in end() 243 assert(Position < Path.size() && "Tried to increment past end!"); in operator ++() 249 if (Position == Path.size()) { in operator ++() 260 if (is_separator(Path[Position], S)) { in operator ++() 265 Component = Path.substr(Position, 1); in operator ++() 270 while (Position != Path.size() && is_separator(Path[Position], S)) { in operator ++() 275 if (Position == Path.size() && Component != "/") { in operator ++() 283 size_t end_pos = Path.find_first_of(separators(S), Position); in operator ++() 284 Component = Path.slice(Position, end_pos); in operator ++() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/ |
| H A D | GetDylibInterface.cpp | 21 Twine Path) { in getDylibInterfaceFromDylib() argument 30 auto Buf = MemoryBuffer::getFile(Path); in getDylibInterfaceFromDylib() 32 return createFileError(Path, Buf.getError()); in getDylibInterfaceFromDylib() 54 return make_error<StringError>("MachO universal binary at " + Path + in getDylibInterfaceFromDylib() 59 return make_error<StringError>("File at " + Path + " is not a MachO", in getDylibInterfaceFromDylib() 63 return make_error<StringError>("MachO at " + Path + " is not a dylib", in getDylibInterfaceFromDylib() 78 Twine Path) { in getDylibInterfaceFromTapiFile() argument 81 auto TapiFileBuffer = MemoryBuffer::getFile(Path); in getDylibInterfaceFromTapiFile() 83 return createFileError(Path, TapiFileBuffer.getError()); in getDylibInterfaceFromTapiFile() 110 Expected<SymbolNameSet> getDylibInterface(ExecutionSession &ES, Twine Path) { in getDylibInterface() argument [all …]
|
| H A D | LoadLinkableFile.cpp | 42 loadLinkableFile(StringRef Path, const Triple &TT, LoadArchives LA, in loadLinkableFile() argument 45 IdentifierOverride = Path; in loadLinkableFile() 48 sys::fs::openNativeFileForRead(Path, sys::fs::OF_None); in loadLinkableFile() 50 return createFileError(Path, FDOrErr.takeError()); in loadLinkableFile() 58 StringRef("Could not load object at path ") + Path, Buf.getError()); in loadLinkableFile() 69 Path + " does not contain a relocatable object file", in loadLinkableFile() 73 return make_error<StringError>(Path + " does not contain an archive", in loadLinkableFile() 86 return make_error<StringError>(Path + " does not contain an archive", in loadLinkableFile() 99 return make_error<StringError>(Path + " does not contain an archive", in loadLinkableFile() 113 FD, std::move(*Buf), TT, LA, Path, *IdentifierOverride); in loadLinkableFile() [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/llvm/include/llvm/Support/ |
| H A D | VirtualFileSystem.h | 145 virtual void setPath(const Twine &Path) {} in setPath() argument 151 std::string Path; variable 156 directory_entry(std::string Path, llvm::sys::fs::file_type Type) in directory_entry() argument 157 : Path(std::move(Path)), Type(Type) {} in directory_entry() 159 llvm::StringRef path() const { return Path; } in path() 237 LLVM_ABI recursive_directory_iterator(FileSystem &FS, const Twine &Path, 274 virtual llvm::ErrorOr<Status> status(const Twine &Path) = 0; 278 openFileForRead(const Twine &Path) = 0; 286 openFileForReadBinary(const Twine &Path) { in openFileForReadBinary() argument 287 return openFileForRead(Path); in openFileForReadBinary() [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/lldb/source/Plugins/Protocol/MCP/ |
| H A D | Protocol.h | 34 bool fromJSON(const llvm::json::Value &, Request &, llvm::json::Path); 43 bool fromJSON(const llvm::json::Value &, ErrorInfo &, llvm::json::Path); 51 bool fromJSON(const llvm::json::Value &, Error &, llvm::json::Path); 60 bool fromJSON(const llvm::json::Value &, Response &, llvm::json::Path); 69 bool fromJSON(const llvm::json::Value &, Notification &, llvm::json::Path); 77 bool fromJSON(const llvm::json::Value &, ToolCapability &, llvm::json::Path); 90 llvm::json::Path); 104 bool fromJSON(const llvm::json::Value &, Capabilities &, llvm::json::Path); 122 bool fromJSON(const llvm::json::Value &, Resource &, llvm::json::Path); 138 bool fromJSON(const llvm::json::Value &, ResourceContents &, llvm::json::Path); [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/APINotes/ |
| H A D | APINotesManager.cpp | 143 llvm::SmallString<128> Path(Directory.getName()); in findAPINotesFile() local 148 llvm::sys::path::append(Path, llvm::Twine(Basename) + Suffix + "." + in findAPINotesFile() 150 return FM.getOptionalFileRef(Path, /*Open*/ true); in findAPINotesFile() 157 llvm::SmallString<128> Path(FrameworkPath); in loadFrameworkAPINotes() local 158 unsigned FrameworkNameLength = Path.size(); in loadFrameworkAPINotes() 163 llvm::sys::path::append(Path, "APINotes"); in loadFrameworkAPINotes() 164 llvm::sys::path::append(Path, (llvm::Twine(FrameworkName) + Suffix + "." + in loadFrameworkAPINotes() 168 auto APINotesFile = FM.getOptionalFileRef(Path); in loadFrameworkAPINotes() 173 Path.resize(FrameworkNameLength); in loadFrameworkAPINotes() 174 llvm::sys::path::append(Path, Public ? "Headers" : "PrivateHeaders"); in loadFrameworkAPINotes() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/Tooling/ |
| H A D | FileMatchTrie.cpp | 63 if (Path.empty()) { in insert() 65 Path = std::string(NewPath); in insert() 70 if (NewPath == Path) in insert() 74 StringRef(Path).drop_back(ConsumedLength))); in insert() 75 Children[Element].Path = Path; in insert() 111 if (llvm::sys::path::filename(Path) == in findEquivalent() 113 Comparator.equivalent(StringRef(Path), FileName)) in findEquivalent() 114 return StringRef(Path); in findEquivalent() 155 if (Path.empty()) in getAll() 158 Results.push_back(StringRef(Path)); in getAll() [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/Basic/ |
| H A D | FileSystemStatCache.cpp | 32 std::error_code FileSystemStatCache::get(StringRef Path, 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() 62 IsText ? FS.openFileForRead(Path) : FS.openFileForReadBinary(Path); in get() 103 MemorizeStatCalls::getStat(StringRef Path, llvm::vfs::Status &Status, in getStat() argument 107 auto err = get(Path, Status, isFile, F, nullptr, FS); in getStat() 117 if (!Status.isDirectory() || llvm::sys::path::is_absolute(Path)) in getStat() 118 StatCalls[Path] = Status; in getStat()
|
| /freebsd/contrib/llvm-project/clang/lib/Driver/ToolChains/ |
| H A D | MipsLinux.cpp | 57 for (const auto &Path : Callback(SelectedMultilibs.back())) in AddClangSystemIncludeArgs() local 58 addExternCSystemIncludeIfExists(DriverArgs, CC1Args, D.Dir + Path); in AddClangSystemIncludeArgs() 96 for (std::string Path : Callback(SelectedMultilibs.back())) { in addLibCxxIncludePaths() local 97 Path = getDriver().Dir + Path + "/c++/v1"; in addLibCxxIncludePaths() 98 if (llvm::sys::fs::exists(Path)) { in addLibCxxIncludePaths() 99 addSystemInclude(DriverArgs, CC1Args, Path); in addLibCxxIncludePaths() 121 SmallString<128> Path(getDriver().ResourceDir); in getCompilerRT() local 122 llvm::sys::path::append(Path, SelectedMultilibs.back().osSuffix(), "lib" + LibSuffix, in getCompilerRT() 137 Path, Twine("libclang_rt." + Component + "-" + "mips" + Suffix)); in getCompilerRT() 138 return std::string(Path); in getCompilerRT()
|