llvm::sys::path::convert_to_slash

Replaces backslashes with slashes if Windows.

Synopsis

Declared in <llvm/Support/Path.h>

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

Return Value

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

Parameters

NameDescription
pathprocessed path
styleThe path style to use. "native" means derive from the host.