LLVM  8.0.1
Classes | Enumerations | Functions
llvm::sys::path Namespace Reference

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)
 
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 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...
 

Enumeration Type Documentation

◆ Style

Enumerator
windows 
posix 
native 

Definition at line 29 of file Path.h.

Function Documentation

◆ append() [1/3]

void llvm::sys::path::append ( SmallVectorImpl< char > &  path,
const Twine a,
const Twine b = "",
const Twine c = "",
const Twine d = "" 
)

Append to path.

/foo + bar/f => /foo/bar/f
/foo/ + bar/f => /foo/bar/f
foo + bar/f => foo/bar/f
Parameters
pathSet to path + component.
aThe component to be appended to path.

Definition at line 480 of file Path.cpp.

References llvm::support::native.

Referenced by llvm::opt::DerivedArgList::AddFlagArg(), llvm::opt::DerivedArgList::AddJoinedArg(), llvm::opt::DerivedArgList::AddPositionalArg(), llvm::opt::DerivedArgList::AddSeparateArg(), append(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::append(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::assign(), computeRelativePath(), llvm::createControlHeightReductionLegacyPass(), createUniqueEntity(), llvm::HexagonShuffler::end(), ExpandResponseFile(), llvm::sys::Process::FindInEnvPath(), findInputFile(), findSrcDirMap(), llvm::symbolize::LLVMSymbolizer::flush(), llvm::DiagnosticLocation::getAbsolutePath(), llvm::DWARFUnit::getCompilationDir(), llvm::LineEditor::getDefaultHistoryPath(), getFilename(), llvm::DWARFDebugLine::LineTable::getFileNameByIndex(), llvm::object::Archive::Child::getFullName(), llvm::unittest::getInputFileDirectory(), getVFSEntries(), greaterWithBias(), llvm::detail::IEEEFloat::IEEEFloat(), llvm::vfs::VFSFromYamlDirIterImpl::increment(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::insert(), llvm::lto::localCache(), llvm::sys::fs::make_absolute(), llvm::sys::path::reverse_iterator::operator*(), printDwarfFileDirective(), llvm::pruneCache(), remove_dots(), llvm::sys::fs::directory_entry::replace_filename(), replace_path_prefix(), llvm::rdf::NodeBase::setFlags(), llvm::SmallVector< llvm::cl::parser::OptionInfo, 8 >::SmallVector(), llvm::opt::ArgList::toOptSpecifier(), llvm::detail::IEEEFloat::toString(), and writeGeneratedObject().

◆ append() [2/3]

void llvm::sys::path::append ( SmallVectorImpl< char > &  path,
Style  style,
const Twine a,
const Twine b = "",
const Twine c = "",
const Twine d = "" 
)

◆ append() [3/3]

void llvm::sys::path::append ( SmallVectorImpl< char > &  path,
const_iterator  begin,
const_iterator  end,
Style  style = Style::native 
)

Append to path.

/foo + [bar,f] => /foo/bar/f
/foo/ + [bar,f] => /foo/bar/f
foo + [bar,f] => foo/bar/f
Parameters
pathSet to path + [begin, end).
beginStart of components to append.
endOne past the end of components to append.

Definition at line 485 of file Path.cpp.

References append(), begin(), and end().

◆ begin()

const_iterator llvm::sys::path::begin ( StringRef  path,
Style  style = Style::native 
)

Get begin iterator over path.

Parameters
pathInput path.
Returns
Iterator initialized with the first component of path.

Definition at line 250 of file Path.cpp.

Referenced by llvm::vfs::YAMLVFSWriter::addFileMapping(), addReadAttrs(), llvm::DWARFUnitVector::addUnit(), llvm::DWARFUnitVector::addUnitsForDWOSection(), llvm::adl_detail::adl_begin(), allocateVGPR32Input(), append(), llvm::MemoryDepChecker::areDepsSafe(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::assign(), llvm::IntrusiveBackList< llvm::DIE >::begin(), llvm::detail::enumerator< R >::begin(), llvm::ScheduleDAGMI::bottom(), llvm::DICompositeType::buildODRType(), canTurnIntoCOPY(), llvm::CC_X86_64_VectorCallGetGPRs(), llvm::CC_X86_VectorCallGetSSEs(), llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::clear(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::clear(), computeRelativePath(), llvm::ImmutableList< T >::contains(), llvm::detail::IEEEFloat::convertFromZeroExtendedInteger(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::copy(), llvm::LiveRange::covers(), llvm::pdb::SymbolCache::createGlobalsEnumerator(), llvm::SmallVectorTemplateCommon< T >::data(), llvm::ScheduleDAGInstrs::doMBBSchedRegionsTopDown(), llvm::VarStreamArray< LineColumnEntry, LineColumnExtractor >::drop_front(), llvm::DomTreeUpdater::dump(), llvm::ScheduleDAGMI::dumpSchedule(), llvm::MachineInstrSpan::empty(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::AttributeSetNode::end(), llvm::AttributeListImpl::end(), llvm::ListInit::end(), llvm::Registry< T >::entries(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::equals(), llvm::SparseSet< unsigned, llvm::VirtReg2IndexFunctor >::erase(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::erase(), llvm::LiveRange::find(), llvm::DWARFDebugAranges::findAddress(), llvm::SparseSet< unsigned, llvm::VirtReg2IndexFunctor >::findIndex(), findTemporariesForLR(), foldConstantInsEltIntoShuffle(), llvm::SmallVectorTemplateCommon< T >::front(), llvm::FixedStreamArray< PSHashRecord >::front(), get64BitArgumentGPRs(), get64BitArgumentXMMs(), getAllSGPR128(), getAllSGPRs(), llvm::AttributeSetNode::getAsString(), llvm::MCObjectStreamer::getCurrentFragment(), llvm::SubtargetFeatures::getFeatureBits(), getFirstReloc(), llvm::ExecutionEngine::getGlobalValueAtAddress(), llvm::getIntrinsicWithChain(), llvm::getIntrinsicWithoutChain(), llvm::AVRMCExpr::getKindByName(), llvm::AVRMCExpr::getName(), getPrefixes(), llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::getPrevNode(), llvm::R600RegisterInfo::getReservedRegs(), llvm::MipsRegisterInfo::getReservedRegs(), llvm::PPCRegisterInfo::getReservedRegs(), llvm::ScheduleDAGMILive::getScheduledTrees(), llvm::DWARFUnitVector::getUnitForIndexEntry(), llvm::DWARFUnitVector::getUnitForOffset(), greaterWithBias(), llvm::SmallVectorTemplateBase< T >::grow(), llvm::codeview::LocallyHashedType::hashTypes(), llvm::TargetLoweringBase::initActions(), INITIALIZE_PASS(), llvm::PriorityWorklist< llvm::LazyCallGraph::SCC *, SmallVector< llvm::LazyCallGraph::SCC *, N >, SmallDenseMap< llvm::LazyCallGraph::SCC *, ptrdiff_t > >::insert(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::insert(), llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::insertAfter(), isAlwaysFoldable(), llvm::AArch64RegisterInfo::isAnyArgRegReserved(), isDebug(), isF128SoftLibCall(), isImageOrSamplerVal(), isIntrinsicInline(), llvm::HexagonMCInstrInfo::isOrderedDuplexPair(), llvm::LiveRange::join(), llvm::StringMap< uint64_t >::keys(), LLVMGetFirstTarget(), llvm::coverage::CoverageMapping::load(), lookupFoldTableImpl(), llvm::vfs::lookupInMemoryNode(), LookupNEONLdSt(), llvm::TargetRegistry::lookupTarget(), lowerV8I16GeneralSingleInputVectorShuffle(), llvm::MachineTraceMetrics::MachineTraceMetrics(), llvm::make_early_inc_range(), llvm::make_filter_range(), llvm::make_pointee_range(), llvm::make_pointer_range(), llvm::makeArrayRef(), llvm::itanium_demangle::AbstractManglingParser< ManglingParser< Alloc >, Alloc >::makeNodeArray(), llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::max_size(), mayUsePostIncMode(), llvm::LiveRange::MergeValueNumberInto(), node_eq(), llvm::GraphTraits< MachineRegionInfo * >::nodes_begin(), llvm::GraphTraits< RegionInfo * >::nodes_begin(), llvm::GraphTraits< VPRegionBlock * >::nodes_begin(), llvm::GraphTraits< const VPRegionBlock * >::nodes_begin(), llvm::GraphTraits< Inverse< VPRegionBlock * > >::nodes_begin(), llvm::CallBase::operandBundleFromBundleOpInfo(), llvm::sys::path::reverse_iterator::operator*(), llvm::PooledStringPtr::operator*(), llvm::pointee_iterator< WrappedIteratorT, T >::operator*(), llvm::pointer_iterator< WrappedIteratorT, T >::operator*(), AllocaSlices::partition_iterator::operator*(), llvm::Registry< T >::iterator::operator->(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::operator<(), llvm::TargetLibraryInfoImpl::operator=(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::operator=(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::operator==(), llvm::SmallVectorTemplateCommon< T >::operator[](), llvm::itanium_demangle::PODSmallVector< llvm::itanium_demangle::ForwardTemplateReference *, 4 >::operator[](), llvm::LiveRange::overlapsFrom(), llvm::OwningArrayRef< T >::OwningArrayRef(), llvm::vfs::RedirectingFileSystemParser::parse(), llvm::MCSectionMachO::ParseSectionSpecifier(), pathHasTraversal(), performCustomAdjustments(), llvm::MachineBasicBlock::phis(), llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::pop_front(), llvm::MIBundleBuilder::prepend(), llvm::DominanceFrontierBase< BasicBlock, false >::print(), llvm::LoopBase< BasicBlock, Loop >::print(), printMCExpr(), llvm::AttributeSetNode::Profile(), ProfitableToMerge(), llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::push_front(), llvm::readExponent(), remove_dots(), llvm::DominanceFrontierBase< BasicBlock, false >::removeBlock(), llvm::PMDataManager::removeNotPreservedAnalysis(), llvm::RegionBase< RegionTraits< Function > >::removeSubRegion(), llvm::SmallVectorTemplateCommon< T >::rend(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::rend(), llvm::MutableArrayRef< BitWord >::rend(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::resize(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::reverse(), root_directory(), root_name(), root_path(), llvm::ReservoirSampler< T, GenT >::sample(), llvm::VLIWMachineScheduler::schedule(), llvm::ScheduleDAGMI::schedule(), llvm::ScheduleDAGMILive::schedule(), llvm::object::COFFObjectFile::section_rel_begin(), setRequiredFeatureString(), llvm::skipLeadingZeroesAndAnyDot(), AllocaSlices::SliceBuilder::SliceBuilder(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::HexagonBlockRanges::RangeList::subtract(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::swap(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::take_until(), llvm::MutableArrayRef< BitWord >::take_until(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::take_while(), llvm::MutableArrayRef< BitWord >::take_while(), llvm::TargetLibraryInfoImpl::TargetLibraryInfoImpl(), llvm::TargetLoweringBase::TargetLoweringBase(), llvm::vfs::InMemoryFileSystem::toString(), llvm::HexagonBlockRanges::RangeList::unionize(), llvm::UnrollAndJamLoop(), llvm::InnerLoopVectorizer::updateAnalysis(), llvm::MemorySSAUpdater::updateExitBlocksForClonedLoop(), llvm::TargetLoweringBase::ValueTypeActionImpl::ValueTypeActionImpl(), llvm::LiveRange::verify(), llvm::LoopInfoBase< BasicBlock, Loop >::verify(), llvm::verifyIntrinsicTables(), llvm::LoopBase< BasicBlock, Loop >::verifyLoop(), llvm::LoopBase< BasicBlock, Loop >::verifyLoopNest(), verifyTables(), writeIdentificationBlock(), llvm::AntiDepBreaker::~AntiDepBreaker(), llvm::SmallVector< llvm::cl::parser::OptionInfo, 8 >::~SmallVector(), and llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::~SmallVectorImpl().

◆ convert_to_slash()

std::string llvm::sys::path::convert_to_slash ( StringRef  path,
Style  style = Style::native 
)

Replaces backslashes with slashes if Windows.

Parameters
pathprocessed path
Returns
The result of replacing backslashes with forward slashes if Windows. On Unix, this function is a no-op because backslashes are valid path chracters.

Definition at line 581 of file Path.cpp.

References replace(), and llvm::StringRef::str().

Referenced by llvm::TarWriter::append(), and llvm::sys::path::reverse_iterator::operator*().

◆ end()

const_iterator llvm::sys::path::end ( StringRef  path)

Get end iterator over path.

Parameters
pathInput path.
Returns
Iterator initialized to the end of path.

Definition at line 259 of file Path.cpp.

References llvm::StringRef::size().

Referenced by llvm::LiveRangeUpdater::add(), llvm::vfs::YAMLVFSWriter::addFileMapping(), addReadAttrs(), llvm::LiveRange::addSegment(), llvm::DominanceFrontierBase< BasicBlock, false >::addToFrontier(), llvm::DWARFUnitVector::addUnit(), llvm::DWARFUnitVector::addUnitsForDWOSection(), llvm::adl_detail::adl_begin(), llvm::adl_detail::adl_end(), llvm::LiveRange::advanceTo(), append(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::append(), llvm::MIBundleBuilder::append(), llvm::VPBasicBlock::appendRecipe(), llvm::MemoryDepChecker::areDepsSafe(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::assign(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::MachineBasicBlock::back(), llvm::FixedStreamArray< PSHashRecord >::back(), llvm::DenseMapBase< DenseMap< const llvm::SCEV *, const llvm::SCEV *, DenseMapInfo< const llvm::SCEV *>, llvm::detail::DenseMapPair< const llvm::SCEV *, const llvm::SCEV *> >, const llvm::SCEV *, const llvm::SCEV *, DenseMapInfo< const llvm::SCEV *>, llvm::detail::DenseMapPair< const llvm::SCEV *, const llvm::SCEV *> >::begin(), llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::begin(), llvm::IntrusiveBackList< llvm::DIE >::begin(), llvm::ScheduleDAGMI::bottom(), buildMultiplyTree(), llvm::DICompositeType::buildODRType(), canBeFeederToNewValueJump(), canCompareBeNewValueJump(), canTurnIntoCOPY(), llvm::CC_X86_64_VectorCallGetGPRs(), llvm::CC_X86_VectorCallGetSSEs(), llvm::LiveIntervals::checkRegMaskInterference(), checkThreadCommand(), llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::clear(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::clear(), llvm::DominanceFrontierBase< BasicBlock, false >::compare(), computeRelativePath(), llvm::ImmutableList< T >::contains(), llvm::LiveRange::Segment::contains(), llvm::LiveRange::Segment::containsInterval(), llvm::detail::IEEEFloat::convertFromZeroExtendedInteger(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::copy(), llvm::SparseSet< unsigned, llvm::VirtReg2IndexFunctor >::count(), llvm::StringMap< uint64_t >::count(), llvm::SmallPtrSetImpl< const llvm::SCEV * >::count(), llvm::LiveRange::covers(), llvm::createCopyConstrainDAGMutation(), llvm::pdb::SymbolCache::createGlobalsEnumerator(), llvm::decodeSLEB128(), llvm::decodeULEB128(), llvm::LegalizerInfo::decreaseToSmallerTypesAndIncreaseToSmallest(), llvm::ScheduleDAGInstrs::doMBBSchedRegionsTopDown(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::drop_until(), llvm::MutableArrayRef< BitWord >::drop_until(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::drop_while(), llvm::MutableArrayRef< BitWord >::drop_while(), llvm::DomTreeUpdater::dump(), llvm::ScheduleDAGMI::dumpSchedule(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::emplace_back(), llvm::MachineInstrSpan::empty(), llvm::detail::enumerator< R >::end(), llvm::Registry< T >::entries(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::equals(), llvm::SparseSet< unsigned, llvm::VirtReg2IndexFunctor >::erase(), llvm::StringMap< uint64_t >::erase(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::erase(), ExpandCryptoAEK(), llvm::UnwindOpcodeAssembler::Finalize(), llvm::DenseMapBase< DenseMap< const llvm::SCEV *, const llvm::SCEV *, DenseMapInfo< const llvm::SCEV *>, llvm::detail::DenseMapPair< const llvm::SCEV *, const llvm::SCEV *> >, const llvm::SCEV *, const llvm::SCEV *, DenseMapInfo< const llvm::SCEV *>, llvm::detail::DenseMapPair< const llvm::SCEV *, const llvm::SCEV *> >::find(), llvm::LiveRange::find(), llvm::StringMap< uint64_t >::find(), llvm::DenseMapBase< DenseMap< const llvm::SCEV *, const llvm::SCEV *, DenseMapInfo< const llvm::SCEV *>, llvm::detail::DenseMapPair< const llvm::SCEV *, const llvm::SCEV *> >, const llvm::SCEV *, const llvm::SCEV *, DenseMapInfo< const llvm::SCEV *>, llvm::detail::DenseMapPair< const llvm::SCEV *, const llvm::SCEV *> >::find_as(), llvm::DWARFDebugAranges::findAddress(), llvm::SparseSet< unsigned, llvm::VirtReg2IndexFunctor >::findIndex(), llvm::LiveRange::FindSegmentContaining(), llvm::SSAUpdater::FindValueForBlock(), format_to_buffer(), generateEquivalentSub(), llvm::pdb::HashTable< llvm::pdb::SrcHeaderBlockEntry, llvm::pdb::StringTableHashTraits >::get(), get64BitArgumentGPRs(), get64BitArgumentXMMs(), getAllocationDataForFunction(), llvm::AttributeSetNode::getAsString(), llvm::SubtargetFeatures::getFeatureBits(), llvm::ExecutionEngine::getGlobalValueAtAddress(), llvm::getIntrinsicWithChain(), llvm::getIntrinsicWithoutChain(), llvm::AVRMCExpr::getKindByName(), llvm::AVRMCExpr::getName(), llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::getNextNode(), getPrefixes(), llvm::object::ArchiveMemberHeader::getRawName(), llvm::R600RegisterInfo::getReservedRegs(), llvm::MipsRegisterInfo::getReservedRegs(), llvm::ScheduleDAGMILive::getScheduledTrees(), llvm::LiveRange::getSegmentContaining(), llvm::DenseMapInfo< CallValue >::getTombstoneKey(), llvm::DWARFUnitVector::getUnitForIndexEntry(), llvm::DWARFUnitVector::getUnitForOffset(), getUs(), llvm::LiveRange::getVNInfoAt(), llvm::LiveRange::getVNInfoBefore(), greaterWithBias(), llvm::SmallVectorTemplateBase< T >::grow(), llvm::hashing::detail::hash_combine_range_impl(), llvm::codeview::LocallyHashedType::hashTypes(), llvm::MachineInstr::implicit_operands(), llvm::TargetLoweringBase::initActions(), INITIALIZE_PASS(), llvm::PriorityWorklist< llvm::LazyCallGraph::SCC *, SmallVector< llvm::LazyCallGraph::SCC *, N >, SmallDenseMap< llvm::LazyCallGraph::SCC *, ptrdiff_t > >::insert(), llvm::SparseSet< unsigned, llvm::VirtReg2IndexFunctor >::insert(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::insert(), llvm::MachineBasicBlock::insert(), llvm::MachineBasicBlock::insertAfter(), llvm::interpretDecimal(), isAlwaysFoldable(), llvm::AArch64RegisterInfo::isAnyArgRegReserved(), isDebug(), isF128SoftLibCall(), isImageOrSamplerVal(), isInSymtab(), isIntrinsicInline(), llvm::LiveRange::isLiveAtIndexes(), llvm::HexagonMCInstrInfo::isOrderedDuplexPair(), llvm::SplitAnalysis::isOriginalEndpoint(), isUnconditionalBranch(), llvm::LiveRange::join(), llvm::StringMap< uint64_t >::keys(), llvm::LiveRange::liveAt(), LLVMGetFirstTarget(), llvm::coverage::CoverageMapping::load(), llvm::StringMap< uint64_t >::lookup(), lookupFoldTableImpl(), llvm::vfs::lookupInMemoryNode(), LookupNEONLdSt(), llvm::TargetRegistry::lookupTarget(), llvm::MachineTraceMetrics::MachineTraceMetrics(), llvm::make_early_inc_range(), llvm::make_filter_range(), llvm::make_pointee_range(), llvm::make_pointer_range(), llvm::makeArrayRef(), llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::max_size(), mayUsePostIncMode(), mergeOperations(), llvm::LiveRange::MergeValueNumberInto(), llvm::LegalizerInfo::moreToWiderTypesAndLessToWidest(), node_eq(), llvm::GraphTraits< MachineRegionInfo * >::nodes_end(), llvm::GraphTraits< RegionInfo * >::nodes_end(), llvm::GraphTraits< VPRegionBlock * >::nodes_end(), llvm::GraphTraits< const VPRegionBlock * >::nodes_end(), llvm::GraphTraits< Inverse< VPRegionBlock * > >::nodes_end(), llvm::sys::path::reverse_iterator::operator*(), AllocaSlices::partition_iterator::operator*(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::operator<(), llvm::TargetLibraryInfoImpl::operator=(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::operator=(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::operator==(), llvm::LiveRange::overlaps(), llvm::LiveRange::overlapsFrom(), llvm::vfs::RedirectingFileSystemParser::parse(), llvm::MCSectionMachO::ParseSectionSpecifier(), pathHasTraversal(), performCustomAdjustments(), llvm::SmallVectorTemplateBase< T >::pop_back(), llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::pop_back(), llvm::DominanceFrontierBase< BasicBlock, false >::print(), llvm::LoopBase< BasicBlock, Loop >::print(), printMCExpr(), llvm::AttributeSetNode::Profile(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorTemplateBase< T, true >::push_back(), llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::push_back(), llvm::LiveRange::Query(), llvm::SmallVectorTemplateCommon< T >::rbegin(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::rbegin(), llvm::MutableArrayRef< BitWord >::rbegin(), llvm::readExponent(), remove_dots(), llvm::DominanceFrontierBase< BasicBlock, false >::removeBlock(), llvm::DominanceFrontierBase< BasicBlock, false >::removeFromFrontier(), llvm::PMDataManager::removeNotPreservedAnalysis(), llvm::LiveRange::removeValNo(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::resize(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::reverse(), root_directory(), root_name(), root_path(), setRequiredFeatureString(), llvm::skipLeadingZeroesAndAnyDot(), AllocaSlices::SliceBuilder::SliceBuilder(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::Regex::sub(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::swap(), llvm::TargetLibraryInfoImpl::TargetLibraryInfoImpl(), llvm::TargetLoweringBase::TargetLoweringBase(), llvm::MachineBasicBlock::terminators(), llvm::vfs::InMemoryFileSystem::toString(), llvm::APInt::toString(), llvm::totalExponent(), llvm::LiveIntervals::HMEditor::updateAllRanges(), llvm::InnerLoopVectorizer::updateAnalysis(), llvm::MemorySSAUpdater::updateExitBlocksForClonedLoop(), llvm::utohexstr(), llvm::utostr(), llvm::TargetLoweringBase::ValueTypeActionImpl::ValueTypeActionImpl(), llvm::LiveRange::verify(), llvm::LoopInfoBase< BasicBlock, Loop >::verify(), llvm::verifyIntrinsicTables(), llvm::LoopBase< BasicBlock, Loop >::verifyLoop(), llvm::LoopBase< BasicBlock, Loop >::verifyLoopNest(), verifyTables(), llvm::VirtRegAuxInfo::VirtRegAuxInfo(), llvm::VirtRegAuxInfo::weightCalcHelper(), write_unsigned_impl(), llvm::AntiDepBreaker::~AntiDepBreaker(), and llvm::SmallVector< llvm::cl::parser::OptionInfo, 8 >::~SmallVector().

◆ extension()

StringRef llvm::sys::path::extension ( StringRef  path,
Style  style = Style::native 
)

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 "".

/foo/bar.txt => .txt
/foo/bar => <empty>
/foo/.txt => .txt
Parameters
pathInput path.
Returns
The extension of path.

Definition at line 605 of file Path.cpp.

References filename(), llvm::StringRef::find_last_of(), llvm::StringRef::npos, llvm::StringRef::size(), and llvm::StringRef::substr().

Referenced by llvm::DWARFContext::dump(), llvm::symbolize::LLVMSymbolizer::flush(), llvm::pdb::PDBSymbolCompiland::getSourceFileFullPath(), has_extension(), and llvm::sys::path::reverse_iterator::operator*().

◆ filename()

StringRef llvm::sys::path::filename ( StringRef  path,
Style  style = Style::native 
)

◆ get_separator()

StringRef llvm::sys::path::get_separator ( Style  style = Style::native)

Return the preferred separator for this platform.

Returns
StringRef of the preferred separator, null-terminated.

Definition at line 626 of file Path.cpp.

Referenced by llvm::SourceMgr::AddIncludeFile(), and llvm::sys::path::reverse_iterator::operator*().

◆ has_extension()

bool llvm::sys::path::has_extension ( const Twine path,
Style  style = Style::native 
)

Has extension?

extension != ""

Parameters
pathInput path.
Returns
True if the path has a extension, false otherwise.

Definition at line 681 of file Path.cpp.

References llvm::StringRef::empty(), extension(), and llvm::Twine::toStringRef().

Referenced by llvm::sys::path::reverse_iterator::operator*().

◆ has_filename()

bool llvm::sys::path::has_filename ( const Twine path,
Style  style = Style::native 
)

Has filename?

filename != ""

Parameters
pathInput path.
Returns
True if the path has a filename, false otherwise.

Definition at line 660 of file Path.cpp.

References llvm::StringRef::empty(), filename(), and llvm::Twine::toStringRef().

Referenced by llvm::sys::path::reverse_iterator::operator*().

◆ has_parent_path()

bool llvm::sys::path::has_parent_path ( const Twine path,
Style  style = Style::native 
)

Has parent path?

parent_path != ""

Parameters
pathInput path.
Returns
True if the path has a parent path, false otherwise.

Definition at line 667 of file Path.cpp.

References llvm::StringRef::empty(), parent_path(), and llvm::Twine::toStringRef().

Referenced by llvm::sys::path::reverse_iterator::operator*().

◆ has_relative_path()

bool llvm::sys::path::has_relative_path ( const Twine path,
Style  style = Style::native 
)

Has relative path?

relative_path != ""

Parameters
pathInput path.
Returns
True if the path has a relative path, false otherwise.

Definition at line 653 of file Path.cpp.

References llvm::StringRef::empty(), relative_path(), and llvm::Twine::toStringRef().

Referenced by llvm::sys::path::reverse_iterator::operator*().

◆ has_root_directory()

bool llvm::sys::path::has_root_directory ( const Twine path,
Style  style = Style::native 
)

Has root directory?

root_directory != ""

Parameters
pathInput path.
Returns
True if the path has a root directory, false otherwise.

Definition at line 639 of file Path.cpp.

References llvm::StringRef::empty(), root_directory(), and llvm::Twine::toStringRef().

Referenced by is_absolute(), llvm::sys::fs::make_absolute(), and llvm::sys::path::reverse_iterator::operator*().

◆ has_root_name()

bool llvm::sys::path::has_root_name ( const Twine path,
Style  style = Style::native 
)

Has root name?

root_name != ""

Parameters
pathInput path.
Returns
True if the path has a root name, false otherwise.

Definition at line 632 of file Path.cpp.

References llvm::StringRef::empty(), root_name(), and llvm::Twine::toStringRef().

Referenced by append(), is_absolute(), llvm::sys::fs::make_absolute(), and llvm::sys::path::reverse_iterator::operator*().

◆ has_root_path()

bool llvm::sys::path::has_root_path ( const Twine path,
Style  style = Style::native 
)

Has root path?

root_path != ""

Parameters
pathInput path.
Returns
True if the path has a root path, false otherwise.

Definition at line 646 of file Path.cpp.

References llvm::StringRef::empty(), root_path(), and llvm::Twine::toStringRef().

Referenced by llvm::sys::path::reverse_iterator::operator*().

◆ has_stem()

bool llvm::sys::path::has_stem ( const Twine path,
Style  style = Style::native 
)

Has stem?

stem != ""

Parameters
pathInput path.
Returns
True if the path has a stem, false otherwise.

Definition at line 674 of file Path.cpp.

References llvm::StringRef::empty(), stem(), and llvm::Twine::toStringRef().

Referenced by llvm::sys::path::reverse_iterator::operator*().

◆ home_directory()

bool llvm::sys::path::home_directory ( SmallVectorImpl< char > &  result)

Get the user's home directory.

Parameters
resultHolds the resulting path name.
Returns
True if a home directory is set, false otherwise.

Referenced by llvm::LineEditor::getDefaultHistoryPath(), native(), and llvm::sys::path::reverse_iterator::operator*().

◆ is_absolute()

bool llvm::sys::path::is_absolute ( const Twine path,
Style  style = Style::native 
)

◆ is_relative()

bool llvm::sys::path::is_relative ( const Twine path,
Style  style = Style::native 
)

Is path relative?

Parameters
pathInput path.
Returns
True if the path is relative, false if it is not.

Definition at line 699 of file Path.cpp.

References is_absolute().

Referenced by ExpandResponseFile(), llvm::DWARFUnit::getCompilationDir(), and llvm::sys::path::reverse_iterator::operator*().

◆ is_separator()

bool llvm::sys::path::is_separator ( char  value,
Style  style = Style::native 
)

Check whether the given char is a path separator on the host OS.

Parameters
valuea character
Returns
true if value is a path separator character on the host OS

Definition at line 618 of file Path.cpp.

Referenced by append(), native(), llvm::sys::path::reverse_iterator::operator*(), llvm::sys::path::const_iterator::operator++(), llvm::sys::path::reverse_iterator::operator++(), remove_leading_dotslash(), root_directory(), root_name(), root_path(), and llvm::stripDirPrefix().

◆ native() [1/2]

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 '\'.

Parameters
pathA path that is transformed to native format.
resultHolds the result of the transformation.

Definition at line 547 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::pdb::PDBFileBuilder::addInjectedSource(), llvm::unittest::getInputFileDirectory(), and llvm::pruneCache().

◆ native() [2/2]

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 '\'.

Parameters
pathA path that is transformed to native format.

Definition at line 557 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(), replace(), and llvm::SmallVectorBase::size().

◆ parent_path()

StringRef llvm::sys::path::parent_path ( StringRef  path,
Style  style = Style::native 
)

◆ rbegin()

reverse_iterator llvm::sys::path::rbegin ( StringRef  path,
Style  style = Style::native 
)

Get reverse begin iterator over path.

Parameters
pathInput path.
Returns
Iterator initialized with the first reverse component of path.

Definition at line 321 of file Path.cpp.

References I, and llvm::StringRef::size().

Referenced by filename(), llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::max_size(), and llvm::sys::path::reverse_iterator::operator*().

◆ relative_path()

StringRef llvm::sys::path::relative_path ( StringRef  path,
Style  style = Style::native 
)

Get relative path.

C:\hello\world => hello\world
foo/bar => foo/bar
/foo/bar => foo/bar
Parameters
pathInput path.
Returns
The path starting after root_path if one exists, otherwise "".

Definition at line 437 of file Path.cpp.

References root_path(), llvm::StringRef::size(), and llvm::StringRef::substr().

Referenced by llvm::symbolize::LLVMSymbolizer::flush(), has_relative_path(), llvm::sys::fs::make_absolute(), llvm::sys::path::reverse_iterator::operator*(), and remove_dots().

◆ remove_dots() [1/2]

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.

Parameters
pathprocessed path
remove_dot_dotspecify if '../' (except for leading "../") should be removed
Returns
True if path was changed

Definition at line 741 of file Path.cpp.

References llvm::SmallVectorTemplateCommon< T, typename >::data(), remove_dots(), llvm::SmallVectorBase::size(), and llvm::SmallVectorImpl< T >::swap().

Referenced by llvm::vfs::InMemoryFileSystem::getRealPath(), llvm::vfs::lookupInMemoryNode(), llvm::vfs::RedirectingFileSystem::lookupPath(), llvm::sys::path::reverse_iterator::operator*(), llvm::vfs::InMemoryFileSystem::setCurrentWorkingDirectory(), and llvm::vfs::InMemoryFileSystem::toString().

◆ remove_dots() [2/2]

static SmallString<256> llvm::sys::path::remove_dots ( StringRef  path,
bool  remove_dot_dot,
Style  style 
)
static

◆ remove_filename()

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.

directory/filename.cpp => directory/
directory/ => directory
filename.cpp => <empty>
/ => /
Parameters
pathA path that is modified to not have a file component.

Definition at line 499 of file Path.cpp.

References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::StringRef::npos, llvm::SmallVectorBase::set_size(), and llvm::SmallVectorBase::size().

Referenced by llvm::symbolize::LLVMSymbolizer::flush(), and llvm::sys::path::reverse_iterator::operator*().

◆ remove_leading_dotslash()

StringRef llvm::sys::path::remove_leading_dotslash ( StringRef  path,
Style  style = Style::native 
)

Remove redundant leading "./" pieces and consecutive separators.

Parameters
pathInput path.
Returns
The cleaned-up path.

Definition at line 703 of file Path.cpp.

References is_separator(), llvm::StringRef::size(), and llvm::StringRef::substr().

Referenced by llvm::DiagnosticLocation::getAbsolutePath(), llvm::vfs::RedirectingFileSystem::lookupPath(), and llvm::sys::path::reverse_iterator::operator*().

◆ rend()

reverse_iterator llvm::sys::path::rend ( StringRef  path)

Get reverse end iterator over path.

Parameters
pathInput path.
Returns
Iterator initialized to the reverse end of path.

Definition at line 329 of file Path.cpp.

References I, and llvm::StringRef::substr().

Referenced by llvm::iplist_impl< simple_ilist< MachineInstr, Options... >, ilist_traits< MachineInstr > >::max_size(), and llvm::sys::path::reverse_iterator::operator*().

◆ replace_extension()

void llvm::sys::path::replace_extension ( SmallVectorImpl< char > &  path,
const Twine extension,
Style  style = Style::native 
)

Replace the file extension of path with extension.

./filename.cpp => ./filename.extension
./filename => ./filename.extension
./ => ./.extension
Parameters
pathA path that has its extension replaced with extension.
extensionThe 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 505 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, bool >::push_back(), llvm::SmallVectorBase::set_size(), llvm::SmallVectorBase::size(), llvm::StringRef::size(), and llvm::Twine::toStringRef().

Referenced by getImplibPath(), getOutputPath(), and llvm::sys::path::reverse_iterator::operator*().

◆ replace_path_prefix()

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.

/foo, /old, /new => /foo
/old/foo, /old, /new => /new/foo
/foo, <empty>, /new => /new/foo
/old/foo, /old, <empty> => /foo
Parameters
PathIf Path starts with OldPrefix modify to instead start with NewPrefix.
OldPrefixThe path prefix to strip from Path.
NewPrefixThe path prefix to replace NewPrefix with.

Definition at line 524 of file Path.cpp.

References append(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::copy(), llvm::StringRef::empty(), llvm::SmallVectorBase::size(), llvm::StringRef::size(), llvm::StringRef::substr(), and llvm::SmallVectorImpl< T >::swap().

Referenced by llvm::lto::getThinLTOOutputFile(), and llvm::sys::path::reverse_iterator::operator*().

◆ root_directory()

StringRef llvm::sys::path::root_directory ( StringRef  path,
Style  style = Style::native 
)

Get root directory.

/goo/hello => /
c:/hello => /
d/file.txt => <empty>
Parameters
pathInput path.
Returns
The root directory of path if it has one, otherwise "".

Definition at line 414 of file Path.cpp.

References begin(), end(), and is_separator().

Referenced by has_root_directory(), llvm::sys::fs::make_absolute(), and llvm::sys::path::reverse_iterator::operator*().

◆ root_name()

StringRef llvm::sys::path::root_name ( StringRef  path,
Style  style = Style::native 
)

Get root name.

//net/hello => //net
c:/hello => c: (on Windows, on other platforms nothing)
/hello => <empty>
Parameters
pathInput path.
Returns
The root name of path if it has one, otherwise "".

Definition at line 397 of file Path.cpp.

References begin(), end(), and is_separator().

Referenced by has_root_name(), llvm::sys::fs::make_absolute(), and llvm::sys::path::reverse_iterator::operator*().

◆ root_path()

StringRef llvm::sys::path::root_path ( StringRef  path,
Style  style = Style::native 
)

Get root path.

Equivalent to root_name + root_directory.

Parameters
pathInput path.
Returns
The root path of path if it has one, otherwise "".

Definition at line 371 of file Path.cpp.

References begin(), end(), is_separator(), and llvm::StringRef::substr().

Referenced by has_root_path(), llvm::sys::path::reverse_iterator::operator*(), relative_path(), and remove_dots().

◆ stem()

StringRef llvm::sys::path::stem ( StringRef  path,
Style  style = Style::native 
)

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.

/foo/bar.txt => bar
/foo/bar => bar
/foo/.txt => <empty>
/foo/. => .
/foo/.. => ..
Parameters
pathInput path.
Returns
The stem of path.

Definition at line 592 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(), and llvm::sys::path::reverse_iterator::operator*().

◆ system_temp_directory()

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".

Parameters
erasedOnRebootWhether 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.
resultHolds the resulting path name.

Referenced by createUniqueEntity(), and llvm::sys::path::reverse_iterator::operator*().