Lines Matching refs:StringRef
23 using llvm::StringRef;
34 StringRef find_first_component(StringRef path) {
76 size_t filename_pos(StringRef str) {
88 if (pos == StringRef::npos)
92 if (pos == StringRef::npos ||
99 size_t root_dir_start(StringRef str) {
112 return StringRef::npos;
126 return StringRef::npos;
129 size_t parent_path_end(StringRef path) {
143 return StringRef::npos;
153 const_iterator begin(StringRef path) {
161 const_iterator end(StringRef path) {
176 Component = StringRef();
264 const StringRef root_path(StringRef path) {
293 return StringRef();
296 const StringRef root_name(StringRef path) {
315 return StringRef();
318 const StringRef root_directory(StringRef path) {
344 return StringRef();
347 const StringRef relative_path(StringRef path) {
348 StringRef root = root_path(path);
361 SmallVector<StringRef, 4> components;
367 for (SmallVectorImpl<StringRef>::const_iterator i = components.begin(),
377 StringRef c = i->substr(loc);
399 const StringRef parent_path(StringRef path) {
401 if (end_pos == StringRef::npos)
402 return StringRef();
408 size_t end_pos = parent_path_end(StringRef(path.begin(), path.size()));
409 if (end_pos != StringRef::npos)
414 StringRef p(path.begin(), path.size());
416 StringRef ext = extension.toStringRef(ext_storage);
420 if (pos != StringRef::npos && pos >= filename_pos(p))
436 StringRef p = path.toStringRef(path_storage);
438 for (StringRef::const_iterator i = p.begin(),
452 const StringRef filename(StringRef path) {
456 const StringRef stem(StringRef path) {
457 StringRef fname = filename(path);
459 if (pos == StringRef::npos)
469 const StringRef extension(StringRef path) {
470 StringRef fname = filename(path);
472 if (pos == StringRef::npos)
473 return StringRef();
477 return StringRef();
524 StringRef p = path.toStringRef(path_storage);
531 StringRef p = path.toStringRef(path_storage);
538 StringRef p = path.toStringRef(path_storage);
545 StringRef p = path.toStringRef(path_storage);
552 StringRef p = path.toStringRef(path_storage);
559 StringRef p = path.toStringRef(path_storage);
566 StringRef p = path.toStringRef(path_storage);
573 StringRef p = path.toStringRef(path_storage);
580 StringRef p = path.toStringRef(path_storage);
601 StringRef p(path.data(), path.size());
628 StringRef cdrn = path::root_name(current_dir);
637 StringRef pRootName = path::root_name(p);
638 StringRef bRootDirectory = path::root_directory(current_dir);
639 StringRef bRelativePath = path::relative_path(current_dir);
640 StringRef pRelativePath = path::relative_path(p);
654 StringRef p = path.toStringRef(path_storage);
656 StringRef parent = path::parent_path(p);
729 StringRef Magic = magic.toStringRef(MagicStorage);
746 file_magic identify_magic(StringRef magic) {
867 error_code remove_all_r(StringRef path, file_type ft, uint32_t &count) {
896 StringRef p = path.toStringRef(path_storage);