llvm::needConversion

Query whether a file needs conversion to the UTF-8 codepage.

Synopsis

Declared in <llvm/Support/AutoConvert.h>

ErrorOr<bool>
needConversion(
    Twine const& FileName,
    int const FD = -1);

Description

On non-z/OS platforms this always reports that conversion is not needed.

Return Value

True if conversion is needed, false if not, or an error if the tag cannot be queried.

Parameters

NameDescription
FileNameThe path used when FD is not available.
FDAn optional open file descriptor; when not -1 it is preferred over FileName for reading the file tag.