Parse LLVM Assembly into an existing Module or ModuleSummaryIndex.
Declared in <llvm/AsmParser/Parser.h>
bool
parseAssemblyInto(
MemoryBufferRef F,
Module* M,
ModuleSummaryIndex* Index,
SMDiagnostic& Err,
SlotMapping* Slots = nullptr,
DataLayoutCallbackTy DataLayoutCallback = [](StringRef, StringRef) { return std::nullopt; },
AsmParserContext* ParserContext = nullptr);
This function is the low-level interface to the LLVM Assembly Parser. This is kept as an independent function instead of being inlined into parseAssembly for the convenience of interactive users that want to add recently parsed bits to an existing module.
true on error.
| Name | Description |
|---|---|
| F | The MemoryBuffer containing assembly |
| M | The module to add data to. |
| Index | The index to add data to. |
| Err | Error result info. |
| Slots | The optional slot mapping that will be initialized during parsing. |
| DataLayoutCallback | Override datalayout in the llvm assembly. |
| ParserContext | Optional context that records source locations. |