Associate a filename with a specified logical file number.
Declared in <llvm/MC/MCStreamer.h>
virtual
Expected<unsigned int>
tryEmitDwarfFileDirective(
unsigned int FileNo,
StringRef Directory,
StringRef Filename,
std::optional<MD5::MD5Result> Checksum = std::nullopt,
std::optional<StringRef> Source = std::nullopt,
unsigned int CUID = 0);
Also associate a directory, optional checksum, and optional source text with the logical file. This implements the DWARF2 '.file 4 "dir/foo.c"' assembler directive, and the DWARF5 '.file 4 "dir/foo.c" md5 "..." source "..."' assembler directive.
The assigned logical file number, or an error on failure.
| Name | Description |
|---|---|
| FileNo | - Logical file number. |
| Directory | - Directory component of the file path. |
| Filename | - File name component of the file path. |
| Checksum | - Optional MD5 checksum of the source file. |
| Source | - Optional embedded source text. |
| CUID | - DWARF compile-unit id. |