Go to the documentation of this file.
13 #ifndef LLVM_ASMPARSER_PARSER_H
14 #define LLVM_ASMPARSER_PARSER_H
26 class MemoryBufferRef;
28 class ModuleSummaryIndex;
70 std::unique_ptr<Module>
Mod;
71 std::unique_ptr<ModuleSummaryIndex>
Index;
94 StringRef Filename, SMDiagnostic &Err, LLVMContext &
Context,
105 std::unique_ptr<ModuleSummaryIndex>
116 MemoryBufferRef
F, SMDiagnostic &Err, LLVMContext &
Context,
117 SlotMapping *Slots =
nullptr,
131 SlotMapping *Slots =
nullptr);
139 std::unique_ptr<ModuleSummaryIndex>
156 MemoryBufferRef
F,
Module *M, ModuleSummaryIndex *Index, SMDiagnostic &Err,
157 SlotMapping *Slots =
nullptr,
169 const SlotMapping *Slots =
nullptr);
177 const SlotMapping *Slots =
nullptr);
187 const Module &M,
const SlotMapping *Slots =
nullptr);
This is an optimization pass for GlobalISel generic memory operations.
std::unique_ptr< Module > parseAssemblyString(StringRef AsmString, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr)
The function is a secondary interface to the LLVM Assembly Parser.
Type * parseTypeAtBeginning(StringRef Asm, unsigned &Read, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots=nullptr)
Parse a string Asm that starts with a type.
std::unique_ptr< ModuleSummaryIndex > parseSummaryIndexAssembly(MemoryBufferRef F, SMDiagnostic &Err)
Parse LLVM Assembly for summary index from a MemoryBuffer.
The instances of the Type class are immutable: once they are created, they are never changed.
ParsedModuleAndIndex parseAssemblyWithIndex(MemoryBufferRef F, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr)
Parse LLVM Assembly including the summary index from a MemoryBuffer.
std::unique_ptr< Module > parseAssembly(MemoryBufferRef F, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, DataLayoutCallbackTy DataLayoutCallback=[](StringRef) { return None;})
parseAssemblyFile and parseAssemblyString are wrappers around this function.
std::unique_ptr< Module > Mod
Type * parseType(StringRef Asm, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots=nullptr)
Parse a type in the given string.
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...
std::unique_ptr< Module > parseAssemblyFile(StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr)
This function is a main interface to the LLVM Assembly Parser.
An efficient, type-erasing, non-owning reference to a callable.
This struct contains the mappings from the slot numbers to unnamed metadata nodes,...
This is an important class for using LLVM in a threaded context.
ParsedModuleAndIndex parseAssemblyFileWithIndex(StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, DataLayoutCallbackTy DataLayoutCallback=[](StringRef) { return None;})
This function is a main interface to the LLVM Assembly Parser.
std::unique_ptr< ModuleSummaryIndex > Index
std::unique_ptr< ModuleSummaryIndex > parseSummaryIndexAssemblyFile(StringRef Filename, SMDiagnostic &Err)
This function is a main interface to the LLVM Assembly Parser.
ParsedModuleAndIndex parseAssemblyFileWithIndexNoUpgradeDebugInfo(StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots, DataLayoutCallbackTy DataLayoutCallback)
Only for use in llvm-as for testing; this does not produce a valid module.
StringRef - Represent a constant reference to a string, i.e.
Holds the Module and ModuleSummaryIndex returned by the interfaces that parse both.
Machine Check Debug Module
Constant * parseConstantValue(StringRef Asm, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots=nullptr)
Parse a type and a constant value in the given string.
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
llvm::function_ref< Optional< std::string >StringRef)> DataLayoutCallbackTy
bool parseAssemblyInto(MemoryBufferRef F, Module *M, ModuleSummaryIndex *Index, SMDiagnostic &Err, SlotMapping *Slots=nullptr, DataLayoutCallbackTy DataLayoutCallback=[](StringRef) { return None;})
This function is the low-level interface to the LLVM Assembly Parser.