| /llvm-project-15.0.7/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() 36 if (stat(Path.c_str(), &St)) in IsDirectory() 43 if (stat(Path.c_str(), &St)) in FileSize() 51 assert(Pos < Path.size()); in Basename() 52 return Path.substr(Pos + 1); in Basename() 70 V->push_back(Path); in ListFilesInDirRecursive() 92 FileCallback(Path); in IterateDirRecursive() 123 unlink(Path.c_str()); in RemoveFile() 165 mkdir(Path.c_str(), 0700); in MkDir() [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() 42 std::ifstream T(Path, std::ios::binary); in FileToVector() 62 std::ifstream T(Path, std::ios::binary); in FileToString() 72 WriteToFile(U.data(), U.size(), Path); in WriteToFile() 77 Path); in WriteToFile() 82 FILE *Out = fopen(Path.c_str(), "wb"); in WriteToFile() 90 Path); in AppendToFile() 94 FILE *Out = fopen(Path.c_str(), "a"); in AppendToFile() 206 [](const std::string &Path) { RmDir(Path); }, in RmDirRecursive() argument [all …]
|
| H A D | FuzzerIOWindows.cpp | 62 bool IsFile(const std::string &Path) { in IsFile() argument 71 return IsFile(Path, Att); in IsFile() 94 assert(Pos < Path.size()); in Basename() 95 return Path.substr(Pos + 1); in Basename() 119 std::string Path(Dir); in ListFilesInDirRecursive() local 120 assert(!Path.empty()); in ListFilesInDirRecursive() 121 if (Path.back() != '\\') in ListFilesInDirRecursive() 122 Path.push_back('\\'); in ListFilesInDirRecursive() 123 Path.push_back('*'); in ListFilesInDirRecursive() 200 FileCallback(Path); in IterateDirRecursive() [all …]
|
| H A D | FuzzerIO.h | 18 long GetEpoch(const std::string &Path); 23 std::string FileToString(const std::string &Path); 25 void CopyFileToErr(const std::string &Path); 30 void WriteToFile(const Unit &U, const std::string &Path); 68 bool IsFile(const std::string &Path); 69 bool IsDirectory(const std::string &Path); 70 size_t FileSize(const std::string &Path); 97 std::string Basename(const std::string &Path); 105 void RemoveFile(const std::string &Path); 110 void MkDir(const std::string &Path); [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/Testing/Support/ |
| H A D | SupportHelpers.h | 114 SmallString<128> Path; variable 132 Path = Name; 136 Path.clear(); 141 if (!Path.empty()) { in ~TempDir() 174 SmallString<128> Path; variable 179 Path = Link; in TempLink() 182 Path.clear(); in TempLink() 186 if (!Path.empty()) { in ~TempLink() 204 SmallString<128> Path; variable 220 Path = Name; [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/support/ |
| H A D | Path.cpp | 15 std::string maybeCaseFoldPath(PathRef Path) { return Path.lower(); } in maybeCaseFoldPath() argument 18 std::string maybeCaseFoldPath(PathRef Path) { return Path.str(); } 22 PathRef absoluteParent(PathRef Path) { in absoluteParent() argument 23 assert(llvm::sys::path::is_absolute(Path)); in absoluteParent() 27 if (llvm::sys::path::relative_path(Path).empty()) { in absoluteParent() 31 PathRef Result = llvm::sys::path::parent_path(Path); in absoluteParent() 36 bool pathStartsWith(PathRef Ancestor, PathRef Path, in pathStartsWith() argument 39 llvm::sys::path::is_absolute(Path)); in pathStartsWith() 45 if (!pathEqual(Ancestor, Path.take_front(Ancestor.size()))) in pathStartsWith() 47 Path = Path.drop_front(Ancestor.size()); in pathStartsWith() [all …]
|
| /llvm-project-15.0.7/llvm/unittests/Testing/Support/ |
| H A D | TempPathTest.cpp | 30 ASSERT_TRUE(sys::fs::exists(Path)); in TEST() 33 ASSERT_EQ(Path, Dir2->path()); in TEST() 34 ASSERT_TRUE(sys::fs::exists(Path)); in TEST() 37 ASSERT_TRUE(sys::fs::exists(Path)); in TEST() 40 ASSERT_FALSE(sys::fs::exists(Path)); in TEST() 58 ASSERT_TRUE(sys::fs::exists(Path)); in TEST() 61 ASSERT_EQ(Path, File2->path()); in TEST() 62 ASSERT_TRUE(sys::fs::exists(Path)); in TEST() 65 ASSERT_TRUE(sys::fs::exists(Path)); in TEST() 87 ASSERT_TRUE(sys::fs::exists(Path)); in TEST() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-doc/assets/ |
| H A D | index.js | 13 var Path = FilePath; 14 while (Path) { 15 if (CurrentDirectory == Path) 16 return FilePath.substring(Path.length + 1); 17 Path = Path.substring(0, Path.lastIndexOf("/")); 33 var Path = computeRelativePath(Ref.Path, CurrentDirectory); 35 Path = append(Path, "index.html"); 37 Path = append(Path, Ref.Name + ".html") 40 ANode.setAttribute("href", Path);
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | FileCollector.cpp | 40 Path = TmpDest; in isCaseSensitivePath() 46 UpperDest = Path.upper(); in isCaseSensitivePath() 57 SmallVectorImpl<char> &Path) { in updateWithRealPath() argument 58 StringRef SrcPath(Path.begin(), Path.size()); in updateWithRealPath() 85 Path.swap(RealPath); in updateWithRealPath() 91 sys::fs::make_absolute(Path); in makeAbsolute() 94 sys::path::native(Path); in makeAbsolute() 97 Path.erase(Path.begin(), sys::path::remove_leading_dotslash( in makeAbsolute() 98 StringRef(Path.begin(), Path.size())) in makeAbsolute() 264 Collector->addFile(Path); in status() [all …]
|
| H A D | FileOutputBuffer.cpp | 77 : FileOutputBuffer(Path), Buffer(Buf), BufferSize(BufSize), in InMemoryBuffer() 121 return std::make_unique<InMemoryBuffer>(Path, MB, Size, Mode); in createInMemoryBuffer() 127 fs::TempFile::create(Path + ".tmp%%%%%%%", Mode); in createOnDiskBuffer() 147 return createInMemoryBuffer(Path, Size, Mode); in createOnDiskBuffer() 150 return std::make_unique<OnDiskBuffer>(Path, std::move(File), in createOnDiskBuffer() 158 if (Path == "-") in create() 167 return createInMemoryBuffer(Path, Size, Mode); in create() 170 fs::status(Path, Stat); in create() 187 return createInMemoryBuffer(Path, Size, Mode); in create() 189 return createOnDiskBuffer(Path, Size, Mode); in create() [all …]
|
| H A D | Path.cpp | 299 I.Path = Path; in rbegin() 308 I.Path = Path; in rend() 324 if (Position == Path.size() && !Path.empty() && in operator ++() 523 StringRef OrigPath(Path.begin(), Path.size()); in replace_path_prefix() 557 if (Path[0] == '~' && (Path.size() == 1 || is_separator(Path[1], style))) { in native() 560 PathHome.append(Path.begin() + 1, Path.end()); in native() 564 std::replace(Path.begin(), Path.end(), '\\', '/'); in native() 705 while (Path.size() > 2 && Path[0] == '.' && is_separator(Path[1], style)) { in remove_leading_dotslash() 706 Path = Path.substr(2); in remove_leading_dotslash() 708 Path = Path.substr(1); in remove_leading_dotslash() [all …]
|
| H A D | VirtualFileSystem.cpp | 289 return Path; in adjustPath() 823 P.toVector(Path); in addFile() 833 if (Path.empty()) in addFile() 837 auto I = llvm::sys::path::begin(Path), E = sys::path::end(Path); in addFile() 933 P.toVector(Path); in lookupNode() 944 if (Path.empty()) in lookupNode() 1140 P.toVector(Path); in setCurrentWorkingDirectory() 1150 if (!Path.empty()) in setCurrentWorkingDirectory() 1379 Result.append(Path.data(), Path.size()); in makeAbsolute() 2192 canonicalize(StringRef(Path.data(), Path.size())); in makeCanonical() [all …]
|
| /llvm-project-15.0.7/llvm/lib/DebugInfo/Symbolize/ |
| H A D | DIFetcher.cpp | 26 SmallString<128> Path{Directory}; in fetchBuildID() local 27 sys::path::append(Path, ".build-id", in fetchBuildID() 30 Path += ".debug"; in fetchBuildID() 31 return Path; in fetchBuildID() 34 SmallString<128> Path = GetDebugPath( in fetchBuildID() local 43 if (llvm::sys::fs::exists(Path)) in fetchBuildID() 44 return std::string(Path); in fetchBuildID() 48 SmallString<128> Path = GetDebugPath(Directory); in fetchBuildID() local 49 if (llvm::sys::fs::exists(Path)) in fetchBuildID() 50 return std::string(Path); in fetchBuildID()
|
| H A D | Symbolize.cpp | 263 MemoryBuffer::getFileOrSTDIN(Path); in checkFileCRC() 360 for (const auto &Path : DsymPaths) { in lookUpDsymFile() local 474 auto recordPath = [&](StringRef Path) { in getOrFindDebugBinary() argument 475 Result = Path.str(); in getOrFindDebugBinary() 481 Optional<std::string> Path; in getOrFindDebugBinary() local 483 if (Path) { in getOrFindDebugBinary() 484 recordPath(*Path); in getOrFindDebugBinary() 491 if (Path) { in getOrFindDebugBinary() 492 recordPath(*Path); in getOrFindDebugBinary() 683 std::string Path; in getOrCreateModuleInfo() local [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-doc/ |
| H A D | Representation.h | 120 Reference(llvm::StringRef Name, StringRef Path) in Reference() 121 : Name(Name), Path(Path), IsInGlobalNamespace(Path.empty()) {} in Reference() 127 : USR(USR), Name(Name), RefType(IT), Path(Path), in Reference() 128 IsInGlobalNamespace(Path.empty()) {} in Reference() 151 llvm::SmallString<128> Path; member 163 : Type(Type, Field, IT, Path) {} in TypeInfo() 165 TypeInfo(llvm::StringRef RefName, StringRef Path) : Type(RefName, Path) {} in TypeInfo() 181 : TypeInfo(RefName, Path), Name(Name) {} in FieldTypeInfo() 250 : USR(USR), IT(IT), Name(Name), Path(Path) {} in Info() 309 : Info(IT, USR, Name, Path) {} in SymbolInfo() [all …]
|
| /llvm-project-15.0.7/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).hasValue()) { in eventStreamCallback() 161 StringRef Path, in createFSEventStream() argument 164 if (Path.empty()) in createFSEventStream() 187 RealPath = Path.str(); in createFSEventStream() 217 StringRef Path, in create() argument 223 if (Path.empty()) in create() 235 const std::string CopiedPath = Path.str(); in create() [all …]
|
| /llvm-project-15.0.7/lldb/unittests/Host/ |
| H A D | FileSystemTest.cpp | 58 auto S = status(Path); in openFileForRead() 67 cwd = Path.str(); in setCurrentWorkingDirectory() 82 Path.toVector(Output); in getRealPath() 89 std::string Path; member 91 if (Path.size() < S.size() && S.find(Path) == 0) { in isInPath() 93 if (LastSep == Path.size() || LastSep == Path.size() - 1) in isInPath() 101 Path(_Path.str()) { in DirIterImpl() 139 addEntry(Path, S); in addRegularFile() 146 addEntry(Path, S); in addDirectory() 149 void addSymlink(StringRef Path) { in addSymlink() argument [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/ |
| H A D | Protocol.h | 137 llvm::json::Path); 154 llvm::json::Path); 323 llvm::json::Path); 330 llvm::json::Path); 501 llvm::json::Path); 511 llvm::json::Path); 522 llvm::json::Path); 541 llvm::json::Path); 687 llvm::json::Path); 694 llvm::json::Path); [all …]
|
| H A D | URI.cpp | 23 bool isWindowsPath(llvm::StringRef Path) { in isWindowsPath() argument 24 return Path.size() > 1 && llvm::isAlpha(Path[0]) && Path[1] == ':'; in isWindowsPath() 28 return Path.size() > 2 && Path[0] == Path[1] && in isNetworkPath() 45 llvm::SmallString<128> Path; in getAbsolutePath() local 48 ("//" + Authority).toVector(Path); in getAbsolutePath() 53 Path.append(Body); in getAbsolutePath() 54 llvm::sys::path::native(Path); in getAbsolutePath() 55 return std::string(Path); in getAbsolutePath() 204 if (!Path) in resolve() 205 return Path.takeError(); in resolve() [all …]
|
| /llvm-project-15.0.7/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 …]
|
| /llvm-project-15.0.7/llvm/lib/WindowsDriver/ |
| H A D | MSVCPaths.cpp | 116 Path = std::string(SDKPath.str()); in getWindowsSDKDirViaCommandLine() 118 Path = WinSdkDir->str(); in getWindowsSDKDirViaCommandLine() 355 SmallString<256> Path(VCToolChainPath); in getSubDirectoryPath() local 379 sys::path::append(Path, IncludeName); in getSubDirectoryPath() 385 return std::string(Path.str()); in getSubDirectoryPath() 432 SmallString<128> TestPath(Path); in getWindowsSDKDir() 469 Path, nullptr)) in getUniversalCRTSdkDir() 494 Path = VCToolsDir->str(); in findVCToolChainViaCommandLine() 510 Path = std::move(*VCToolsInstallDir); in findVCToolChainViaEnvironment() 520 Path = std::move(*VCInstallDir); in findVCToolChainViaEnvironment() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/unittests/ |
| H A D | URITests.cpp | 64 auto Path = URI::resolve(U, HintPath); in resolveOrDie() local 65 if (!Path) in resolveOrDie() 67 return *Path; in resolveOrDie() 169 if (!Path) in resolvePathOrDie() 171 return *Path; in resolvePathOrDie() 190 auto Path = testPath("x"); in TEST() local 191 auto U = URI::create(Path, "file"); in TEST() 193 EXPECT_THAT(resolveOrDie(*U), Path); in TEST() 198 auto Path = URI::resolve(parseOrDie(Uri)); in TEST() local 199 if (!Path) { in TEST() [all …]
|
| H A D | TUSchedulerTests.cpp | 353 S.update(Path, getInputs(Path, ""), WantDiagnostics::Auto); in TEST_F() 364 S.update(Path, getInputs(Path, ""), WantDiagnostics::Auto); in TEST_F() 1343 S.run(Path, Path, [] {}); in TEST_F() 1347 S.runQuick(Path, Path, [] {}); in TEST_F() 1351 S.update(Path, getInputs(Path, ""), WantDiagnostics::No); in TEST_F() 1352 S.runWithAST(Path, Path, [](llvm::Expected<InputsAndAST> Inp) { in TEST_F() 1358 S.update(Path, getInputs(Path, ""), WantDiagnostics::No); in TEST_F() 1360 Path, Path, TUScheduler::Stale, in TEST_F() 1365 S.update(Path, getInputs(Path, ""), WantDiagnostics::No); in TEST_F() 1371 S.update(Path, getInputs(Path, ""), WantDiagnostics::No); in TEST_F() [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/Support/ |
| H A D | VirtualFileSystem.h | 146 virtual void setPath(const Twine &Path) {} in setPath() argument 152 std::string Path; variable 158 : Path(std::move(Path)), Type(Type) {} in directory_entry() 160 llvm::StringRef path() const { return Path; } in path() 277 openFileForRead(const Twine &Path) = 0; 304 bool exists(const Twine &Path); 430 return FS->status(Path); in status() 434 return FS->openFileForRead(Path); in openFileForRead() 447 return FS->getRealPath(Path, Output); in getRealPath() 450 return FS->isLocal(Path, Result); in isLocal() [all …]
|
| /llvm-project-15.0.7/clang/lib/Driver/ToolChains/ |
| H A D | MipsLinux.cpp | 59 for (const auto &Path : Callback(SelectedMultilib)) in AddClangSystemIncludeArgs() local 61 D.getInstalledDir() + Path); in AddClangSystemIncludeArgs() 99 for (std::string Path : Callback(SelectedMultilib)) { in addLibCxxIncludePaths() local 100 Path = getDriver().getInstalledDir() + Path + "/c++/v1"; in addLibCxxIncludePaths() 101 if (llvm::sys::fs::exists(Path)) { in addLibCxxIncludePaths() 102 addSystemInclude(DriverArgs, CC1Args, Path); in addLibCxxIncludePaths() 124 SmallString<128> Path(getDriver().ResourceDir); in getCompilerRT() local 125 llvm::sys::path::append(Path, SelectedMultilib.osSuffix(), "lib" + LibSuffix, in getCompilerRT() 140 Path, Twine("libclang_rt." + Component + "-" + "mips" + Suffix)); in getCompilerRT() 141 return std::string(Path.str()); in getCompilerRT()
|