|
LLVM
5.0.0
|
Classes | |
| class | const_iterator |
| Path iterator. More... | |
| class | reverse_iterator |
| Reverse path iterator. More... | |
Enumerations | |
| enum | Style { Style::windows, Style::posix, Style::native } |
Functions | |
| static SmallString< 256 > | remove_dots (StringRef path, bool remove_dot_dot, Style style) |
| std::error_code | widenPath (const Twine &Path8, SmallVectorImpl< wchar_t > &Path16) |
Lexical Component Iterator | |
| const_iterator | begin (StringRef path, Style style=Style::native) |
| Get begin iterator over path. More... | |
| const_iterator | end (StringRef path) |
| Get end iterator over path. More... | |
| reverse_iterator | rbegin (StringRef path, Style style=Style::native) |
| Get reverse begin iterator over path. More... | |
| reverse_iterator | rend (StringRef path) |
| Get reverse end iterator over path. More... | |
Lexical Modifiers | |
| void | remove_filename (SmallVectorImpl< char > &path, Style style=Style::native) |
| Remove the last component from path unless it is the root dir. More... | |
| void | replace_extension (SmallVectorImpl< char > &path, const Twine &extension, Style style=Style::native) |
| Replace the file extension of path with extension. More... | |
| void | replace_path_prefix (SmallVectorImpl< char > &Path, const StringRef &OldPrefix, const StringRef &NewPrefix, Style style=Style::native) |
| Replace matching path prefix with another path. More... | |
| void | append (SmallVectorImpl< char > &path, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="") |
| Append to path. More... | |
| void | append (SmallVectorImpl< char > &path, Style style, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="") |
| void | append (SmallVectorImpl< char > &path, const_iterator begin, const_iterator end, Style style=Style::native) |
| Append to path. More... | |
Transforms (or some other better name) | |
| void | native (const Twine &path, SmallVectorImpl< char > &result, Style style=Style::native) |
| Convert path to the native form. More... | |
| void | native (SmallVectorImpl< char > &path, Style style=Style::native) |
| Convert path to the native form in place. More... | |
| std::string | convert_to_slash (StringRef path, Style style=Style::native) |
| Replaces backslashes with slashes if Windows. More... | |
Lexical Observers | |
| StringRef | root_name (StringRef path, Style style=Style::native) |
| Get root name. More... | |
| StringRef | root_directory (StringRef path, Style style=Style::native) |
| Get root directory. More... | |
| StringRef | root_path (StringRef path, Style style=Style::native) |
| Get root path. More... | |
| StringRef | relative_path (StringRef path, Style style=Style::native) |
| Get relative path. More... | |
| StringRef | parent_path (StringRef path, Style style=Style::native) |
| Get parent path. More... | |
| StringRef | filename (StringRef path, Style style=Style::native) |
| Get filename. More... | |
| StringRef | stem (StringRef path, Style style=Style::native) |
| Get stem. More... | |
| StringRef | extension (StringRef path, Style style=Style::native) |
| Get extension. More... | |
| bool | is_separator (char value, Style style=Style::native) |
| Check whether the given char is a path separator on the host OS. More... | |
| StringRef | get_separator (Style style=Style::native) |
| Return the preferred separator for this platform. More... | |
| void | system_temp_directory (bool erasedOnReboot, SmallVectorImpl< char > &result) |
| Get the typical temporary directory for the system, e.g., "/var/tmp" or "C:/TEMP". More... | |
| bool | home_directory (SmallVectorImpl< char > &result) |
| Get the user's home directory. More... | |
| bool | user_cache_directory (SmallVectorImpl< char > &Result, const Twine &Path1, const Twine &Path2="", const Twine &Path3="") |
| Get the user's cache directory. More... | |
| bool | has_root_name (const Twine &path, Style style=Style::native) |
| Has root name? More... | |
| bool | has_root_directory (const Twine &path, Style style=Style::native) |
| Has root directory? More... | |
| bool | has_root_path (const Twine &path, Style style=Style::native) |
| Has root path? More... | |
| bool | has_relative_path (const Twine &path, Style style=Style::native) |
| Has relative path? More... | |
| bool | has_parent_path (const Twine &path, Style style=Style::native) |
| Has parent path? More... | |
| bool | has_filename (const Twine &path, Style style=Style::native) |
| Has filename? More... | |
| bool | has_stem (const Twine &path, Style style=Style::native) |
| Has stem? More... | |
| bool | has_extension (const Twine &path, Style style=Style::native) |
| Has extension? More... | |
| bool | is_absolute (const Twine &path, Style style=Style::native) |
| Is path absolute? More... | |
| bool | is_relative (const Twine &path, Style style=Style::native) |
| Is path relative? More... | |
| StringRef | remove_leading_dotslash (StringRef path, Style style=Style::native) |
| Remove redundant leading "./" pieces and consecutive separators. More... | |
| bool | remove_dots (SmallVectorImpl< char > &path, bool remove_dot_dot=false, Style style=Style::native) |
| In-place remove any '. More... | |
|
strong |
| void llvm::sys::path::append | ( | SmallVectorImpl< char > & | path, |
| const Twine & | a, | ||
| const Twine & | b = "", |
||
| const Twine & | c = "", |
||
| const Twine & | d = "" |
||
| ) |
Append to path.
| path | Set to path + component. |
| a | The component to be appended to path. |
Definition at line 465 of file Path.cpp.
References llvm::support::native.
Referenced by append(), computeRelativePath(), createUniqueEntity(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), ExpandResponseFile(), llvm::sys::Process::FindInEnvPath(), findInputFile(), llvm::LineEditor::getDefaultHistoryPath(), llvm::DWARFDebugLine::LineTable::getFileNameByIndex(), llvm::object::Archive::Child::getFullName(), llvm::lto::localCache(), llvm::sys::fs::make_absolute(), llvm::pruneCache(), remove_dots(), llvm::sys::fs::directory_entry::replace_filename(), replace_path_prefix(), llvm::detail::IEEEFloat::toString(), user_cache_directory(), and writeGeneratedObject().
| void llvm::sys::path::append | ( | SmallVectorImpl< char > & | path, |
| Style | style, | ||
| const Twine & | a, | ||
| const Twine & | b = "", |
||
| const Twine & | c = "", |
||
| const Twine & | d = "" |
||
| ) |
Definition at line 426 of file Path.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::StringRef::begin(), llvm::SmallVectorBase::empty(), llvm::StringRef::end(), has_root_name(), is_separator(), llvm::Twine::isTriviallyEmpty(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::Twine::toStringRef().
| void llvm::sys::path::append | ( | SmallVectorImpl< char > & | path, |
| const_iterator | begin, | ||
| const_iterator | end, | ||
| Style | style = Style::native |
||
| ) |
| const_iterator llvm::sys::path::begin | ( | StringRef | path, |
| Style | style = Style::native |
||
| ) |
Get begin iterator over path.
| path | Input path. |
Definition at line 234 of file Path.cpp.
Referenced by llvm::all_of(), llvm::any_of(), append(), llvm::MemoryDepChecker::areDepsSafe(), llvm::detail::enumerator< R >::begin(), llvm::DICompositeType::buildODRType(), llvm::CC_X86_64_VectorCallGetGPRs(), llvm::CC_X86_VectorCallGetSSEs(), llvm::LoopBodyTraits::child_begin(), llvm::iplist_impl< simple_ilist< MachineBasicBlock, Options...>, ilist_traits< MachineBasicBlock > >::clear(), computeRelativePath(), llvm::concat_iterator< ValueT, IterTs >::concat_iterator(), llvm::ArrayRef< storage::llvm::irsymtab::Symbol >::copy(), llvm::copy_if(), llvm::count(), llvm::count_if(), llvm::drop_begin(), llvm::ArrayRef< storage::llvm::irsymtab::Symbol >::equals(), llvm::CodeExtractor::extractCodeRegion(), llvm::DwarfAccelTable::FinalizeTable(), llvm::find(), llvm::find_if(), llvm::find_if_not(), llvm::DWARFDebugAranges::findAddress(), llvm::pdb::NativeSession::findSymbolByTypeIndex(), foldConstantInsEltIntoShuffle(), get64BitArgumentGPRs(), get64BitArgumentXMMs(), getAllSGPR128(), getAllSGPRs(), llvm::MCObjectStreamer::getCurrentFragment(), llvm::SubtargetFeatures::getFeatureBits(), getFirstReloc(), llvm::getIntrinsicWithChain(), llvm::getIntrinsicWithoutChain(), llvm::AVRMCExpr::getKindByName(), llvm::AVRMCExpr::getName(), llvm::iplist_impl< simple_ilist< MachineBasicBlock, Options...>, ilist_traits< MachineBasicBlock > >::getPrevNode(), llvm::R600RegisterInfo::getReservedRegs(), llvm::MipsRegisterInfo::getReservedRegs(), llvm::PPCRegisterInfo::getReservedRegs(), llvm::object::MachOObjectFile::getSymbolName(), llvm::SmallVectorTemplateBase< T, isPodLike >::grow(), llvm::TargetLoweringBase::initActions(), llvm::PriorityWorklist< llvm::LazyCallGraph::SCC *, SmallVector< llvm::LazyCallGraph::SCC *, N >, SmallDenseMap< llvm::LazyCallGraph::SCC *, ptrdiff_t > >::insert(), llvm::iplist_impl< simple_ilist< MachineBasicBlock, Options...>, ilist_traits< MachineBasicBlock > >::insertAfter(), llvm::is_contained(), isF128SoftLibCall(), isImageOrSamplerVal(), isIntrinsicInline(), llvm::HexagonMCInstrInfo::isOrderedDuplexPair(), LLVMGetFirstTarget(), LookupNEONLdSt(), llvm::TargetRegistry::lookupTarget(), lowerV8I16GeneralSingleInputVectorShuffle(), llvm::MachineTraceMetrics::MachineTraceMetrics(), llvm::make_filter_range(), llvm::make_pointee_range(), llvm::make_pointer_range(), llvm::makeArrayRef(), llvm::simple_ilist< T, Options >::merge(), llvm::GraphTraits< MachineRegionInfo * >::nodes_begin(), llvm::GraphTraits< RegionInfo * >::nodes_begin(), llvm::none_of(), llvm::TargetLibraryInfoImpl::operator=(), llvm::SmallVectorImpl< T >::operator=(), llvm::MCSectionMachO::ParseSectionSpecifier(), llvm::partition(), llvm::iplist_impl< simple_ilist< MachineBasicBlock, Options...>, ilist_traits< MachineBasicBlock > >::pop_front(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::print(), llvm::DwarfAccelTable::print(), llvm::LoopBase< N, M >::print(), llvm::opt::OptTable::PrintHelp(), llvm::iplist_impl< simple_ilist< MachineBasicBlock, Options...>, ilist_traits< MachineBasicBlock > >::push_front(), llvm::readExponent(), remove_dots(), llvm::remove_if(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::removeBlock(), llvm::LoopInfoBase< BasicBlock, Loop >::removeLoop(), llvm::PMDataManager::removeNotPreservedAnalysis(), llvm::RegionBase< RegionTr >::removeSubRegion(), llvm::ArrayRef< storage::llvm::irsymtab::Symbol >::rend(), llvm::MutableArrayRef< BitWord >::rend(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::reverse(), root_directory(), root_name(), root_path(), llvm::object::COFFObjectFile::section_rel_begin(), llvm::skipLeadingZeroesAndAnyDot(), llvm::simple_ilist< T, Options >::sort(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::HexagonBlockRanges::RangeList::subtract(), llvm::SmallVectorImpl< T >::swap(), llvm::ArrayRef< storage::llvm::irsymtab::Symbol >::take_until(), llvm::MutableArrayRef< BitWord >::take_until(), llvm::ArrayRef< storage::llvm::irsymtab::Symbol >::take_while(), llvm::MutableArrayRef< BitWord >::take_while(), llvm::TargetLibraryInfoImpl::TargetLibraryInfoImpl(), llvm::TargetLoweringBase::TargetLoweringBase(), llvm::to_vector(), llvm::transform(), llvm::HexagonBlockRanges::RangeList::unionize(), llvm::TargetLoweringBase::ValueTypeActionImpl::ValueTypeActionImpl(), llvm::LoopInfoBase< N, M >::verify(), llvm::verifyIntrinsicTables(), llvm::LoopBase< N, M >::verifyLoop(), and llvm::LoopBase< N, M >::verifyLoopNest().
| std::string llvm::sys::path::convert_to_slash | ( | StringRef | path, |
| Style | style = Style::native |
||
| ) |
Replaces backslashes with slashes if Windows.
| path | processed path |
Definition at line 566 of file Path.cpp.
References llvm::object::replace(), and llvm::StringRef::str().
Referenced by llvm::TarWriter::append().
| const_iterator llvm::sys::path::end | ( | StringRef | path | ) |
Get end iterator over path.
| path | Input path. |
Definition at line 243 of file Path.cpp.
References llvm::StringRef::size().
Referenced by llvm::DominanceFrontierBase< BlockT, IsPostDom >::addToFrontier(), llvm::all_of(), llvm::any_of(), append(), llvm::MemoryDepChecker::areDepsSafe(), llvm::DICompositeType::buildODRType(), canBeFeederToNewValueJump(), canCompareBeNewValueJump(), llvm::CC_X86_64_VectorCallGetGPRs(), llvm::CC_X86_VectorCallGetSSEs(), llvm::LiveIntervals::checkRegMaskInterference(), checkThreadCommand(), llvm::LoopBodyTraits::child_end(), llvm::iplist_impl< simple_ilist< MachineBasicBlock, Options...>, ilist_traits< MachineBasicBlock > >::clear(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::compare(), computeRelativePath(), llvm::concat_iterator< ValueT, IterTs >::concat_iterator(), llvm::HexagonBlockRanges::IndexRange::contains(), llvm::ArrayRef< storage::llvm::irsymtab::Symbol >::copy(), llvm::copy_if(), llvm::count(), llvm::count_if(), llvm::decodeSLEB128(), llvm::decodeULEB128(), llvm::drop_begin(), llvm::ArrayRef< storage::llvm::irsymtab::Symbol >::drop_until(), llvm::MutableArrayRef< BitWord >::drop_until(), llvm::ArrayRef< storage::llvm::irsymtab::Symbol >::drop_while(), llvm::MutableArrayRef< BitWord >::drop_while(), llvm::detail::enumerator< R >::end(), llvm::ArrayRef< storage::llvm::irsymtab::Symbol >::equals(), llvm::UnwindOpcodeAssembler::Finalize(), llvm::find(), llvm::find_if(), llvm::find_if_not(), llvm::DWARFDebugAranges::findAddress(), llvm::pdb::NativeSession::findSymbolByTypeIndex(), format_to_buffer(), get64BitArgumentGPRs(), get64BitArgumentXMMs(), getAllocationDataForFunction(), llvm::SubtargetFeatures::getFeatureBits(), llvm::getIntrinsicWithChain(), llvm::getIntrinsicWithoutChain(), llvm::AVRMCExpr::getKindByName(), llvm::AVRMCExpr::getName(), llvm::iplist_impl< simple_ilist< MachineBasicBlock, Options...>, ilist_traits< MachineBasicBlock > >::getNextNode(), llvm::object::ArchiveMemberHeader::getRawName(), llvm::R600RegisterInfo::getReservedRegs(), llvm::MipsRegisterInfo::getReservedRegs(), llvm::object::MachOObjectFile::getSymbolName(), getUs(), llvm::SmallVectorTemplateBase< T, isPodLike >::grow(), llvm::hashing::detail::hash_combine_range_impl(), llvm::MachineInstr::implicit_operands(), llvm::TargetLoweringBase::initActions(), llvm::PriorityWorklist< llvm::LazyCallGraph::SCC *, SmallVector< llvm::LazyCallGraph::SCC *, N >, SmallDenseMap< llvm::LazyCallGraph::SCC *, ptrdiff_t > >::insert(), llvm::interpretDecimal(), llvm::is_contained(), isF128SoftLibCall(), isImageOrSamplerVal(), isIntrinsicInline(), llvm::HexagonMCInstrInfo::isOrderedDuplexPair(), llvm::SplitAnalysis::isOriginalEndpoint(), LLVMGetFirstTarget(), LookupNEONLdSt(), llvm::TargetRegistry::lookupTarget(), llvm::MachineTraceMetrics::MachineTraceMetrics(), llvm::make_filter_range(), llvm::make_pointee_range(), llvm::make_pointer_range(), llvm::makeArrayRef(), llvm::HexagonBlockRanges::IndexRange::merge(), llvm::simple_ilist< T, Options >::merge(), llvm::GraphTraits< MachineRegionInfo * >::nodes_end(), llvm::GraphTraits< RegionInfo * >::nodes_end(), llvm::none_of(), llvm::TargetLibraryInfoImpl::operator=(), llvm::SmallVectorImpl< T >::operator=(), llvm::MCSectionMachO::ParseSectionSpecifier(), llvm::partition(), llvm::iplist_impl< simple_ilist< MachineBasicBlock, Options...>, ilist_traits< MachineBasicBlock > >::pop_back(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::print(), llvm::LoopBase< N, M >::print(), llvm::iplist_impl< simple_ilist< MachineBasicBlock, Options...>, ilist_traits< MachineBasicBlock > >::push_back(), llvm::ArrayRef< storage::llvm::irsymtab::Symbol >::rbegin(), llvm::MutableArrayRef< BitWord >::rbegin(), llvm::readExponent(), remove_dots(), llvm::remove_if(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::removeBlock(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::removeFromFrontier(), llvm::LoopInfoBase< BasicBlock, Loop >::removeLoop(), llvm::PMDataManager::removeNotPreservedAnalysis(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::reverse(), root_directory(), root_name(), root_path(), llvm::skipLeadingZeroesAndAnyDot(), llvm::simple_ilist< T, Options >::sort(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::Regex::sub(), llvm::HexagonBlockRanges::RangeList::subtract(), llvm::SmallVectorImpl< T >::swap(), llvm::TargetLibraryInfoImpl::TargetLibraryInfoImpl(), llvm::TargetLoweringBase::TargetLoweringBase(), llvm::to_vector(), llvm::APInt::toString(), llvm::totalExponent(), llvm::transform(), llvm::HexagonBlockRanges::RangeList::unionize(), llvm::utohexstr(), llvm::utostr(), llvm::TargetLoweringBase::ValueTypeActionImpl::ValueTypeActionImpl(), llvm::LoopInfoBase< N, M >::verify(), llvm::verifyIntrinsicTables(), llvm::LoopBase< N, M >::verifyLoop(), llvm::LoopBase< N, M >::verifyLoopNest(), and write_unsigned_impl().
Get extension.
If filename contains a dot but not solely one or two dots, result is the substring of filename starting at (and including) the last dot, and ending at the end of path. Otherwise "".
| path | Input path. |
Definition at line 590 of file Path.cpp.
References filename(), llvm::StringRef::find_last_of(), llvm::StringRef::npos, llvm::StringRef::size(), and llvm::StringRef::substr().
Referenced by has_extension().
Get filename.
| path | Input path. |
Definition at line 575 of file Path.cpp.
References rbegin().
Referenced by llvm::FileOutputBuffer::create(), llvm::Module::createRNG(), extension(), llvm::MCDwarfLineTableHeader::getFile(), llvm::getPGOFuncName(), has_filename(), llvm::LineReader::LineReader(), mangleCoveragePath(), llvm::pruneCache(), stem(), and llvm::object::writeImportLibrary().
| StringRef llvm::sys::path::get_separator | ( | Style | style = Style::native | ) |
Return the preferred separator for this platform.
Definition at line 611 of file Path.cpp.
Referenced by llvm::SourceMgr::AddIncludeFile(), and EmitGenDwarfInfo().
Has extension?
extension != ""
| path | Input path. |
Definition at line 666 of file Path.cpp.
References llvm::StringRef::empty(), extension(), and llvm::Twine::toStringRef().
Has filename?
filename != ""
| path | Input path. |
Definition at line 645 of file Path.cpp.
References llvm::StringRef::empty(), filename(), and llvm::Twine::toStringRef().
Has parent path?
parent_path != ""
| path | Input path. |
Definition at line 652 of file Path.cpp.
References llvm::StringRef::empty(), parent_path(), and llvm::Twine::toStringRef().
Has relative path?
relative_path != ""
| path | Input path. |
Definition at line 638 of file Path.cpp.
References llvm::StringRef::empty(), relative_path(), and llvm::Twine::toStringRef().
Has root directory?
root_directory != ""
| path | Input path. |
Definition at line 624 of file Path.cpp.
References llvm::StringRef::empty(), root_directory(), and llvm::Twine::toStringRef().
Referenced by is_absolute(), and llvm::sys::fs::make_absolute().
Has root name?
root_name != ""
| path | Input path. |
Definition at line 617 of file Path.cpp.
References llvm::StringRef::empty(), root_name(), and llvm::Twine::toStringRef().
Referenced by append(), is_absolute(), and llvm::sys::fs::make_absolute().
Has root path?
root_path != ""
| path | Input path. |
Definition at line 631 of file Path.cpp.
References llvm::StringRef::empty(), root_path(), and llvm::Twine::toStringRef().
Has stem?
stem != ""
| path | Input path. |
Definition at line 659 of file Path.cpp.
References llvm::StringRef::empty(), stem(), and llvm::Twine::toStringRef().
Get the user's home directory.
| result | Holds the resulting path name. |
Referenced by llvm::LineEditor::getDefaultHistoryPath(), and native().
Is path absolute?
| path | Input path. |
Definition at line 673 of file Path.cpp.
References has_root_directory(), has_root_name(), and llvm::Twine::toStringRef().
Referenced by computeRelativePath(), createUniqueEntity(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), llvm::sys::Process::FindInEnvPath(), llvm::DWARFDebugLine::LineTable::getFileNameByIndex(), llvm::object::Archive::Child::getFullName(), is_relative(), and remove_dots().
Is path relative?
| path | Input path. |
Definition at line 684 of file Path.cpp.
References is_absolute().
Referenced by ExpandResponseFile(), and llvm::DWARFDebugLine::LineTable::getFileNameByIndex().
Check whether the given char is a path separator on the host OS.
| value | a character |
Definition at line 603 of file Path.cpp.
Referenced by append(), native(), llvm::sys::path::const_iterator::operator++(), llvm::sys::path::reverse_iterator::operator++(), remove_leading_dotslash(), root_directory(), root_name(), root_path(), and llvm::stripDirPrefix().
| void llvm::sys::path::native | ( | const Twine & | path, |
| SmallVectorImpl< char > & | result, | ||
| Style | style = Style::native |
||
| ) |
Convert path to the native form.
This is used to give paths to users and operating system calls in the platform's normal way. For example, on Windows all '/' are converted to '\'.
| path | A path that is transformed to native format. |
| result | Holds the result of the transformation. |
Definition at line 532 of file Path.cpp.
References assert(), llvm::SmallVectorImpl< T >::clear(), llvm::StringRef::data(), llvm::SmallVectorTemplateCommon< T, typename >::data(), llvm::Twine::getSingleStringRef(), llvm::Twine::isSingleStringRef(), and llvm::Twine::toVector().
Referenced by llvm::pruneCache().
| void llvm::sys::path::native | ( | SmallVectorImpl< char > & | path, |
| Style | style = Style::native |
||
| ) |
Convert path to the native form in place.
This is used to give paths to users and operating system calls in the platform's normal way. For example, on Windows all '/' are converted to '\'.
| path | A path that is transformed to native format. |
Definition at line 542 of file Path.cpp.
References llvm::SmallString< InternalLen >::append(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), home_directory(), is_separator(), llvm::object::replace(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Get parent path.
| path | Input path. |
Definition at line 476 of file Path.cpp.
References llvm::StringRef::npos, and llvm::StringRef::substr().
Referenced by computeRelativePath(), llvm::sys::fs::create_directories(), ExpandResponseFile(), llvm::MCDwarfLineTableHeader::getFile(), llvm::pdb::PDBFile::getFileDirectory(), llvm::object::Archive::Child::getFullName(), llvm::lto::getThinLTOOutputFile(), has_parent_path(), printSymbolizedStackTrace(), and llvm::sys::fs::directory_entry::replace_filename().
| reverse_iterator llvm::sys::path::rbegin | ( | StringRef | path, |
| Style | style = Style::native |
||
| ) |
Get reverse begin iterator over path.
| path | Input path. |
Definition at line 305 of file Path.cpp.
References I, and llvm::StringRef::size().
Referenced by filename().
Get relative path.
| path | Input path. |
Definition at line 421 of file Path.cpp.
References root_path(), llvm::StringRef::size(), and llvm::StringRef::substr().
Referenced by has_relative_path(), llvm::sys::fs::make_absolute(), and remove_dots().
| bool llvm::sys::path::remove_dots | ( | SmallVectorImpl< char > & | path, |
| bool | remove_dot_dot = false, |
||
| Style | style = Style::native |
||
| ) |
In-place remove any '.
/' and optionally '../' components from a path.
| path | processed path |
| remove_dot_dot | specify if '../' (except for leading "../") should be removed |
Definition at line 726 of file Path.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::data(), remove_dots(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::SmallVectorImpl< T >::swap().
|
static |
Definition at line 698 of file Path.cpp.
References append(), llvm::SmallVectorTemplateCommon< T >::back(), begin(), C, llvm::SmallVectorBase::empty(), end(), is_absolute(), llvm::make_range(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::pop_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), relative_path(), and root_path().
Referenced by remove_dots().
| void llvm::sys::path::remove_filename | ( | SmallVectorImpl< char > & | path, |
| Style | style = Style::native |
||
| ) |
Remove the last component from path unless it is the root dir.
| path | A path that is modified to not have a file component. |
Definition at line 484 of file Path.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::StringRef::npos, llvm::SmallVectorImpl< T >::set_size(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Remove redundant leading "./" pieces and consecutive separators.
| path | Input path. |
Definition at line 688 of file Path.cpp.
References is_separator(), llvm::StringRef::size(), and llvm::StringRef::substr().
| reverse_iterator llvm::sys::path::rend | ( | StringRef | path | ) |
Get reverse end iterator over path.
| path | Input path. |
Definition at line 313 of file Path.cpp.
References I, and llvm::StringRef::substr().
| void llvm::sys::path::replace_extension | ( | SmallVectorImpl< char > & | path, |
| const Twine & | extension, | ||
| Style | style = Style::native |
||
| ) |
Replace the file extension of path with extension.
| path | A path that has its extension replaced with extension. |
| extension | The extension to be added. It may be empty. It may also optionally start with a '.', if it does not, one will be prepended. |
Definition at line 490 of file Path.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::StringRef::begin(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::StringRef::end(), llvm::StringRef::find_last_of(), llvm::StringRef::npos, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorImpl< T >::set_size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::StringRef::size(), and llvm::Twine::toStringRef().
Referenced by getImplibPath(), and getOutputPath().
| void llvm::sys::path::replace_path_prefix | ( | SmallVectorImpl< char > & | Path, |
| const StringRef & | OldPrefix, | ||
| const StringRef & | NewPrefix, | ||
| Style | style = Style::native |
||
| ) |
Replace matching path prefix with another path.
| Path | If Path starts with OldPrefix modify to instead start with NewPrefix. |
| OldPrefix | The path prefix to strip from Path. |
| NewPrefix | The path prefix to replace NewPrefix with. |
Definition at line 509 of file Path.cpp.
References append(), llvm::StringRef::begin(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::StringRef::empty(), llvm::StringRef::end(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::StringRef::size(), llvm::StringRef::substr(), and llvm::SmallVectorImpl< T >::swap().
Referenced by llvm::lto::getThinLTOOutputFile().
Get root directory.
| path | Input path. |
Definition at line 398 of file Path.cpp.
References begin(), end(), and is_separator().
Referenced by has_root_directory(), and llvm::sys::fs::make_absolute().
Get root name.
| path | Input path. |
Definition at line 381 of file Path.cpp.
References begin(), end(), and is_separator().
Referenced by has_root_name(), and llvm::sys::fs::make_absolute().
Get root path.
Equivalent to root_name + root_directory.
| path | Input path. |
Definition at line 355 of file Path.cpp.
References begin(), end(), is_separator(), and llvm::StringRef::substr().
Referenced by has_root_path(), relative_path(), and remove_dots().
Get stem.
If filename contains a dot but not solely one or two dots, result is the substring of filename ending at (but not including) the last dot. Otherwise it is filename.
| path | Input path. |
Definition at line 577 of file Path.cpp.
References filename(), llvm::StringRef::find_last_of(), llvm::StringRef::npos, llvm::StringRef::size(), and llvm::StringRef::substr().
Referenced by has_stem().
| void llvm::sys::path::system_temp_directory | ( | bool | erasedOnReboot, |
| SmallVectorImpl< char > & | result | ||
| ) |
Get the typical temporary directory for the system, e.g., "/var/tmp" or "C:/TEMP".
| erasedOnReboot | Whether to favor a path that is erased on reboot rather than one that potentially persists longer. This parameter will be ignored if the user or system has set the typical environment variable (e.g., TEMP on Windows, TMPDIR on *nix) to specify a temporary directory. |
| result | Holds the resulting path name. |
Referenced by createUniqueEntity().
| bool llvm::sys::path::user_cache_directory | ( | SmallVectorImpl< char > & | Result, |
| const Twine & | Path1, | ||
| const Twine & | Path2 = "", |
||
| const Twine & | Path3 = "" |
||
| ) |
Get the user's cache directory.
Expect the resulting path to be a directory shared with other applications/services used by the user. Params Path1 to Path3 can be used to append additional directory names to the resulting path. Recommended pattern is <user_cache_directory>/<vendor>/<application>.
| Result | Holds the resulting path. |
| Path1 | Additional path to be appended to the user's cache directory path. "" can be used to append nothing. |
| Path2 | Second additional path to be appended. |
| Path3 | Third additional path to be appended. |
Definition at line 1056 of file Path.cpp.
References append().
| std::error_code llvm::sys::path::widenPath | ( | const Twine & | Path8, |
| SmallVectorImpl< wchar_t > & | Path16 | ||
| ) |
1.8.6