Home
last modified time | relevance | path

Searched refs:Path (Results 1 – 25 of 587) sorted by relevance

12345678910>>...24

/openbsd/src/gnu/llvm/compiler-rt/lib/fuzzer/
DFuzzerIOPosix.cpp27 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 …]
DFuzzerIO.cpp34 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 Printf("%s", FileToString(Path).c_str()); in CopyFileToErr()
71 void WriteToFile(const Unit &U, const std::string &Path) { in WriteToFile() argument
[all …]
DFuzzerIOWindows.cpp26 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 …]
DFuzzerIO.h18 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 …]
/openbsd/src/gnu/llvm/llvm/include/llvm/Testing/Support/
DSupportHelpers.h114 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 …]
/openbsd/src/gnu/llvm/llvm/lib/Support/
DFileCollector.cpp34 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.equals(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 …]
DFileOutputBuffer.cpp34 OnDiskBuffer(StringRef Path, fs::TempFile Temp, fs::mapped_file_region Buf) in OnDiskBuffer() argument
35 : FileOutputBuffer(Path), Buffer(std::move(Buf)), Temp(std::move(Temp)) {} in OnDiskBuffer()
75 InMemoryBuffer(StringRef Path, MemoryBlock Buf, std::size_t BufSize, in InMemoryBuffer() argument
77 : FileOutputBuffer(Path), Buffer(Buf), BufferSize(BufSize), in InMemoryBuffer()
115 createInMemoryBuffer(StringRef Path, size_t Size, unsigned Mode) { in createInMemoryBuffer() argument
121 return std::make_unique<InMemoryBuffer>(Path, MB, Size, Mode); in createInMemoryBuffer()
125 createOnDiskBuffer(StringRef Path, size_t Size, unsigned Mode) { in createOnDiskBuffer() argument
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()
[all …]
DVirtualFileSystem.cpp127 std::error_code FileSystem::makeAbsolute(SmallVectorImpl<char> &Path) const { in makeAbsolute()
128 if (llvm::sys::path::is_absolute(Path)) in makeAbsolute()
135 llvm::sys::fs::make_absolute(WorkingDir.get(), Path); in makeAbsolute()
139 std::error_code FileSystem::getRealPath(const Twine &Path, in getRealPath() argument
144 std::error_code FileSystem::isLocal(const Twine &Path, bool &Result) { in isLocal() argument
148 bool FileSystem::exists(const Twine &Path) { in exists() argument
149 auto Status = status(Path); in exists()
162 static bool pathHasTraversal(StringRef Path) { in pathHasTraversal() argument
165 for (StringRef Comp : llvm::make_range(path::begin(Path), path::end(Path))) in pathHasTraversal()
203 void setPath(const Twine &Path) override;
[all …]
DPath.cpp228 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 …]
DTarWriter.cpp101 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 …]
DCachePruning.cpp34 std::string Path; member
39 return std::tie(Time, Other.Size, Path) < in operator <()
40 std::tie(Other.Time, Size, Other.Path); in operator <()
145 bool llvm::pruneCache(StringRef Path, CachePruningPolicy Policy, in pruneCache() argument
149 if (Path.empty()) in pruneCache()
153 if (sys::fs::is_directory(Path, isPathDir)) in pruneCache()
171 SmallString<128> TimestampFile(Path); in pruneCache()
212 sys::path::native(Path, CachePathNative); in pruneCache()
253 sys::fs::remove(FileInfo->Path); in pruneCache()
257 LLVM_DEBUG(dbgs() << " - Remove " << FileInfo->Path << " (size " in pruneCache()
[all …]
/openbsd/src/gnu/llvm/clang/lib/DirectoryWatcher/mac/
DDirectoryWatcher-mac.cpp114 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 …]
/openbsd/src/gnu/llvm/llvm/lib/Object/
DBuildID.cpp62 SmallString<128> Path{Directory}; in fetch() local
63 sys::path::append(Path, ".build-id", in fetch()
66 Path += ".debug"; in fetch()
67 return Path; in fetch()
70 SmallString<128> Path = GetDebugPath( in fetch() local
79 if (llvm::sys::fs::exists(Path)) in fetch()
80 return std::string(Path); in fetch()
84 SmallString<128> Path = GetDebugPath(Directory); in fetch() local
85 if (llvm::sys::fs::exists(Path)) in fetch()
86 return std::string(Path); in fetch()
/openbsd/src/gnu/llvm/llvm/include/llvm/Support/
DVirtualFileSystem.h145 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 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 …]
/openbsd/src/gnu/llvm/clang/lib/Tooling/
DFileMatchTrie.cpp64 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 …]
/openbsd/src/gnu/llvm/clang/lib/Driver/ToolChains/
DMipsLinux.cpp59 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()
DHIPSPV.cpp40 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()
160 DriverArgs.MakeArgString(BCFile.Path)}); in addClangTargetOptions()
219 for (auto Path : HipDeviceLibPathArgs) in getDeviceLibs() local
220 LibraryPaths.push_back(DriverArgs.MakeArgString(Path)); in getDeviceLibs()
224 SmallString<128> Path(HipPath); in getDeviceLibs() local
225 llvm::sys::path::append(Path, "lib", "hip-device-lib"); in getDeviceLibs()
[all …]
DAVR.cpp430 SmallString<256> Path(ToolChain::getCompilerRTPath()); in getCompilerRT() local
431 llvm::sys::path::append(Path, "avr"); in getCompilerRT()
432 llvm::sys::path::append(Path, File.str()); in getCompilerRT()
433 return std::string(Path.str()); in getCompilerRT()
566 std::string Path(GCCParent + "/avr"); in findAVRLibcInstallation() local
567 if (llvm::sys::fs::is_directory(Path)) in findAVRLibcInstallation()
568 return Path; in findAVRLibcInstallation()
569 Path = GCCParent + "/../avr"; in findAVRLibcInstallation()
570 if (llvm::sys::fs::is_directory(Path)) in findAVRLibcInstallation()
571 return Path; in findAVRLibcInstallation()
[all …]
/openbsd/src/gnu/llvm/clang/lib/Basic/
DFileSystemStatCache.cpp34 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()
/openbsd/src/gnu/llvm/llvm/lib/DebugInfo/Symbolize/
DSymbolize.cpp249 std::string getDarwinDWARFResourceForPath(const std::string &Path, in getDarwinDWARFResourceForPath() argument
251 SmallString<16> ResourceName = StringRef(Path); in getDarwinDWARFResourceForPath()
252 if (sys::path::extension(Path) != ".dSYM") { in getDarwinDWARFResourceForPath()
260 bool checkFileCRC(StringRef Path, uint32_t CRCHash) { in checkFileCRC() argument
262 MemoryBuffer::getFileOrSTDIN(Path); in checkFileCRC()
320 for (const auto &Path : Opts.DsymHints) { in lookUpDsymFile() local
322 getDarwinDWARFResourceForPath(Path, std::string(Filename))); in lookUpDsymFile()
324 for (const auto &Path : DsymPaths) { in lookUpDsymFile() local
325 auto DbgObjOrErr = getOrCreateObject(Path, ArchName); in lookUpDsymFile()
343 ObjectFile *LLVMSymbolizer::lookUpDebuglinkObject(const std::string &Path, in lookUpDebuglinkObject() argument
[all …]
/openbsd/src/gnu/llvm/llvm/lib/DebugInfo/PDB/
DPDB.cpp22 Error llvm::pdb::loadDataForPDB(PDB_ReaderType Type, StringRef Path, in loadDataForPDB() argument
26 return NativeSession::createFromPdbPath(Path, Session); in loadDataForPDB()
29 return DIASession::createFromPdb(Path, Session); in loadDataForPDB()
35 Error llvm::pdb::loadDataForEXE(PDB_ReaderType Type, StringRef Path, in loadDataForEXE() argument
39 Expected<std::string> PdbPath = NativeSession::searchForPdb({Path}); in loadDataForEXE()
46 return DIASession::createFromExe(Path, Session); in loadDataForEXE()
/openbsd/src/gnu/llvm/lldb/include/lldb/Utility/
DTraceGDBRemotePackets.h36 llvm::json::Path path);
57 llvm::json::Path path);
81 llvm::json::Path path);
94 llvm::json::Path path);
106 llvm::json::Path path);
117 llvm::json::Path path);
128 llvm::json::Path path);
142 llvm::json::Path path);
162 llvm::json::Path path);
/openbsd/src/gnu/llvm/clang/lib/Driver/
DToolChain.cpp80 auto addIfExists = [this](path_list &List, const std::string &Path) { in ToolChain() argument
81 if (getVFS().exists(Path)) in ToolChain()
82 List.push_back(Path); in ToolChain()
85 for (const auto &Path : getRuntimePaths()) in ToolChain() local
86 addIfExists(getLibraryPaths(), Path); in ToolChain()
87 for (const auto &Path : getStdlibPaths()) in ToolChain() local
88 addIfExists(getFilePaths(), Path); in ToolChain()
491 SmallString<128> Path(getDriver().ResourceDir); in getCompilerRTPath() local
493 llvm::sys::path::append(Path, "lib", getOSLibName()); in getCompilerRTPath()
494 Path += SelectedMultilib.gccSuffix(); in getCompilerRTPath()
[all …]
/openbsd/src/gnu/llvm/compiler-rt/lib/xray/tests/unit/
Dprofile_collector_test.cpp87 std::vector<int32_t> Path; member
97 Result.Path.push_back(F); in ParseProfile()
167 ASSERT_NE(Profile1.Path.size(), Profile2.Path.size()); in TEST()
168 auto &P1 = Profile1.Path.size() < Profile2.Path.size() ? Profile2 : Profile1; in TEST()
169 auto &P2 = Profile1.Path.size() < Profile2.Path.size() ? Profile1 : Profile2; in TEST()
172 ASSERT_EQ(P1.Path.size(), P1Expected.size()); in TEST()
173 ASSERT_EQ(P2.Path.size(), P2Expected.size()); in TEST()
174 ASSERT_EQ(P1.Path, P1Expected); in TEST()
175 ASSERT_EQ(P2.Path, P2Expected); in TEST()
/openbsd/src/gnu/llvm/clang/lib/Sema/
DSemaModule.cpp62 static std::string stringFromPath(ModuleIdPath Path) { in stringFromPath() argument
64 if (Path.empty()) in stringFromPath()
67 for (auto &Piece : Path) { in stringFromPath()
180 ModuleDeclKind MDK, ModuleIdPath Path, in ActOnModuleDecl() argument
274 StringRef FirstComponentName = Path[0].first->getName(); in ActOnModuleDecl()
275 if (!getSourceManager().isInSystemHeader(Path[0].second) && in ActOnModuleDecl()
279 Diag(Path[0].second, diag::err_invalid_module_name) in ActOnModuleDecl()
280 << Path[0].first << /*reserved*/ 1; in ActOnModuleDecl()
286 for (auto Part : Path) { in ActOnModuleDecl()
294 std::string ModuleName = stringFromPath(Path); in ActOnModuleDecl()
[all …]

12345678910>>...24