Lines Matching refs:StringRef
34 using llvm::StringRef;
45 StringRef find_first_component(StringRef path) {
88 size_t filename_pos(StringRef str) {
100 if (pos == StringRef::npos)
104 if (pos == StringRef::npos ||
111 size_t root_dir_start(StringRef str) {
124 return StringRef::npos;
138 return StringRef::npos;
141 size_t parent_path_end(StringRef path) {
155 return StringRef::npos;
243 const_iterator begin(StringRef path) {
251 const_iterator end(StringRef path) {
266 Component = StringRef();
351 const StringRef root_path(StringRef path) {
380 return StringRef();
383 const StringRef root_name(StringRef path) {
402 return StringRef();
405 const StringRef root_directory(StringRef path) {
431 return StringRef();
434 const StringRef relative_path(StringRef path) {
435 StringRef root = root_path(path);
448 SmallVector<StringRef, 4> components;
454 for (SmallVectorImpl<StringRef>::const_iterator i = components.begin(),
464 StringRef c = i->substr(loc);
486 const StringRef parent_path(StringRef path) {
488 if (end_pos == StringRef::npos)
489 return StringRef();
495 size_t end_pos = parent_path_end(StringRef(path.begin(), path.size()));
496 if (end_pos != StringRef::npos)
501 StringRef p(path.begin(), path.size());
503 StringRef ext = extension.toStringRef(ext_storage);
507 if (pos != StringRef::npos && pos >= filename_pos(p))
534 const StringRef filename(StringRef path) {
538 const StringRef stem(StringRef path) {
539 StringRef fname = filename(path);
541 if (pos == StringRef::npos)
551 const StringRef extension(StringRef path) {
552 StringRef fname = filename(path);
554 if (pos == StringRef::npos)
555 return StringRef();
559 return StringRef();
576 const StringRef get_separator() {
634 StringRef p = path.toStringRef(path_storage);
641 StringRef p = path.toStringRef(path_storage);
648 StringRef p = path.toStringRef(path_storage);
655 StringRef p = path.toStringRef(path_storage);
662 StringRef p = path.toStringRef(path_storage);
669 StringRef p = path.toStringRef(path_storage);
676 StringRef p = path.toStringRef(path_storage);
683 StringRef p = path.toStringRef(path_storage);
690 StringRef p = path.toStringRef(path_storage);
735 StringRef P = Model.toNullTerminatedStringRef(Storage);
736 assert(P.find_first_of(separators) == StringRef::npos &&
744 createTemporaryFile(const Twine &Prefix, StringRef Suffix, int &ResultFD,
751 std::error_code createTemporaryFile(const Twine &Prefix, StringRef Suffix,
757 std::error_code createTemporaryFile(const Twine &Prefix, StringRef Suffix,
774 StringRef p(path.data(), path.size());
802 StringRef cdrn = path::root_name(current_dir);
811 StringRef pRootName = path::root_name(p);
812 StringRef bRootDirectory = path::root_directory(current_dir);
813 StringRef bRelativePath = path::relative_path(current_dir);
814 StringRef pRelativePath = path::relative_path(p);
828 StringRef P = Path.toStringRef(PathStorage);
839 StringRef Parent = path::parent_path(P);
930 file_magic identify_magic(StringRef Magic) {
1071 Result = identify_magic(StringRef(Buffer, Length));