Open the specified file as a MemoryBuffer, or open stdin if the Filename is "‐".
Synopsis
Declared in <llvm/Support/MemoryBuffer.h>
static
ErrorOr<std::unique_ptr<MemoryBuffer>>
getFileOrSTDIN(
Twine const& Filename,
bool IsText = false,
bool RequiresNullTerminator = true,
std::optional<Align> Alignment = std::nullopt);
Return Value
The file or stdin buffer on success, or an error on failure.
Parameters
Name |
Description |
Filename |
Path of the file to open, or "‐" for stdin. |
IsText |
Set to true to indicate that the file should be read in text mode. |
RequiresNullTerminator |
Whether the buffer must be null‐terminated. |
Alignment |
Set to indicate that the buffer should be aligned to at least the specified alignment. |
Created with MrDocs