llvm::MemoryBufferRef

A non-owning reference to a memory buffer and its identifier.

Synopsis

Declared in <llvm/Support/MemoryBufferRef.h>

class MemoryBufferRef;

Member Functions

NameDescription
MemoryBufferRef [constructor]Constructors
getBuffer Return the referenced buffer contents.
getBufferEnd Pointer one past the last byte of the referenced buffer.
getBufferIdentifier Return the buffer's identifier (often a filename).
getBufferSize Number of bytes in the referenced buffer.
getBufferStart Pointer to the start of the referenced buffer.

Friends

NameDescription
llvm::operator!=True if LHS and RHS do not refer to the same buffer pointers.
llvm::operator==Check pointer identity (not value) of identifier and data.

Non-Member Functions

NameDescription
getBitcodeFileContentsReturn the modules and raw symbol table from a bitcode buffer.
getBitcodeLTOInfoReturns LTO information for the specified bitcode file.
getBitcodeModuleListReturns a list of modules in the specified bitcode buffer.
getBitcodeProducerStringRead the producer string from the header of a bitcode buffer.
getBitcodeTargetTripleRead the header of the specified bitcode buffer and extract just the triple information. If successful, this returns a string. On error, this returns "".
getLazyBitcodeModuleRead bitcode and prepare a module for lazy function deserialization.
getModuleSummaryIndexParse the specified bitcode buffer, returning the module summary index.
isBitcodeContainingObjCCategoryReturn true if Buffer contains a bitcode file with ObjC code (category or class) in it.
parseAssemblyParse LLVM Assembly from a MemoryBuffer.
parseAssemblyIntoParse LLVM Assembly into an existing Module or ModuleSummaryIndex.
parseAssemblyWithIndexParse LLVM Assembly including the summary index from a MemoryBuffer.
parseBitcodeFileRead the specified bitcode file, returning the module.
parseIRIf the given MemoryBuffer holds a bitcode image, return a Module for it. Otherwise, attempt to parse it as LLVM Assembly and return a Module for it.
parseSummaryIndexAssemblyParse LLVM Assembly for summary index from a MemoryBuffer.
readModuleSummaryIndexParse the specified bitcode buffer and merge the index into CombinedIndex.
ifs::readELFFileAttempt to read a binary ELF file from a MemoryBuffer.
jitlink::createLinkGraphFromCOFFObjectCreate a LinkGraph from an COFF relocatable object.
jitlink::createLinkGraphFromCOFFObject_x86_64Create a LinkGraph from an COFF/x86-64 relocatable object.
jitlink::createLinkGraphFromELFObjectCreate a LinkGraph from an ELF relocatable object.
jitlink::createLinkGraphFromELFObject_aarch32Create a LinkGraph from an ELF/arm relocatable object
jitlink::createLinkGraphFromELFObject_aarch64Create a LinkGraph from an ELF/aarch64 relocatable object
jitlink::createLinkGraphFromELFObject_hexagonCreate a LinkGraph from an ELF/Hexagon relocatable object.
jitlink::createLinkGraphFromELFObject_loongarchCreate a LinkGraph from an ELF/loongarch relocatable object
jitlink::createLinkGraphFromELFObject_ppc64Create a LinkGraph from an ELF/ppc64 relocatable object.
jitlink::createLinkGraphFromELFObject_ppc64leCreate a LinkGraph from an ELF/ppc64le relocatable object.
jitlink::createLinkGraphFromELFObject_riscvCreate a LinkGraph from an ELF/riscv relocatable object
jitlink::createLinkGraphFromELFObject_systemzCreate a LinkGraph from an ELF/systemz relocatable object
jitlink::createLinkGraphFromELFObject_x86Create a LinkGraph from an ELF/x86 relocatable object
jitlink::createLinkGraphFromELFObject_x86_64Create a LinkGraph from an ELF/x86-64 relocatable object.
jitlink::createLinkGraphFromMachOObjectCreate a LinkGraph from a MachO relocatable object.
jitlink::createLinkGraphFromMachOObject_arm64Create a LinkGraph from a MachO/arm64 relocatable object.
jitlink::createLinkGraphFromMachOObject_x86_64Create a LinkGraph from a MachO/x86-64 relocatable object.
jitlink::createLinkGraphFromObjectCreate a LinkGraph from the given object buffer.
jitlink::createLinkGraphFromXCOFFObjectCreate a LinkGraph from an XCOFF relocatable object.
jitlink::createLinkGraphFromXCOFFObject_ppc64Create a LinkGraph from an XCOFF/ppc64 relocatable object.
lto::findThinLTOModuleVariant of the above.
object::createBinaryCreate a Binary from Source, autodetecting the file type.
object::extractCodeObjectExtract code object memory from the given Buffer at Offset and of Size, and copy into OutputFileName.
object::extractOffloadBinariesExtracts embedded device offloading code from a memory Buffer to a list of Binaries.
object::parseCOFFModuleDefinitionParse a Windows module-definition (.def) file into a COFFModuleDefinition.
object::readIRSymtabReads a bitcode file, creating its irsymtab if necessary.
offloading::readPropertiesFromJSONParses a property set registry from a JSON buffer.
orc::checkMachORelocatableObjectCheck that a buffer contains a MachO object compatible with a triple.
orc::getMachOSliceRangeForTripleUtility for identifying the file-slice compatible with TT in a universal binary.
MachO::DylibReader::getGet TAPI file representation of binary dylib.
MachO::DylibReader::readFileParse Mach-O dynamic libraries to extract TAPI attributes.
offloading::amdgpu::getAMDGPUMetaDataFromImageReads AMDGPU specific metadata from the ELF file and propagates the KernelInfoMap.