llvm::DIFile::get

Get or create a DIFile with the given operands.

Synopsis

Declared in <llvm/IR/DebugInfoMetadata.h>

static
DIFile*
get(
    LLVMContext& Context,
    MDString* Filename,
    MDString* Directory,
    std::optional<ChecksumInfo<MDString*>> CS = std::nullopt,
    MDString* Source = nullptr);

Description

Also provides getIfExists, getDistinct, and getTemporary variants.

Return Value

The metadata node (uniqued, distinct, or temporary as requested); getIfExists may return nullptr.

Parameters

NameDescription
ContextLLVM context that owns the metadata.
FilenameSource filename.
DirectorySource directory.
CSOptional file checksum.
SourceOptional embedded source text.