ΒΆbool replace_path_prefix(
    SmallVectorImpl<char>& Path,
    llvm::StringRef OldPrefix,
    llvm::StringRef NewPrefix,
    llvm::sys::path::Style style = Style::native)

Description

Replace matching path prefix with another path.

Declared at: llvm/include/llvm/Support/Path.h:194

Parameters

SmallVectorImpl<char>& Path
If \a Path starts with \a OldPrefix modify to instead start with \a NewPrefix.
llvm::StringRef OldPrefix
The path prefix to strip from \a Path.
llvm::StringRef NewPrefix
The path prefix to replace \a NewPrefix with.
llvm::sys::path::Style style = Style::native
The style used to match the prefix. Exact match using Posix style, case/separator insensitive match for Windows style.