14 #ifndef LLVM_ASMPARSER_PARSER_H 15 #define LLVM_ASMPARSER_PARSER_H 24 class ModuleSummaryIndex;
44 std::unique_ptr<Module>
47 StringRef DataLayoutString =
"");
67 SlotMapping *Slots =
nullptr,
69 StringRef DataLayoutString =
"");
74 std::unique_ptr<Module>
Mod;
75 std::unique_ptr<ModuleSummaryIndex>
Index;
108 std::unique_ptr<ModuleSummaryIndex>
152 std::unique_ptr<ModuleSummaryIndex>
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
This class represents lattice values for constants.
Constant * parseConstantValue(StringRef Asm, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots=nullptr)
Parse a type and a constant value in the given string.
A Module instance is used to store all the information related to an LLVM module. ...
std::unique_ptr< Module > parseAssemblyString(StringRef AsmString, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
The function is a secondary interface to the LLVM Assembly Parser.
std::unique_ptr< ModuleSummaryIndex > parseSummaryIndexAssemblyFile(StringRef Filename, SMDiagnostic &Err)
This function is a main interface to the LLVM Assembly Parser.
std::unique_ptr< Module > Mod
Type * parseTypeAtBeginning(StringRef Asm, unsigned &Read, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots=nullptr)
Parse a string Asm that starts with a type.
Class to hold module path string table and global value map, and encapsulate methods for operating on...
std::unique_ptr< ModuleSummaryIndex > parseSummaryIndexAssembly(MemoryBufferRef F, SMDiagnostic &Err)
Parse LLVM Assembly for summary index from a MemoryBuffer.
std::unique_ptr< Module > parseAssembly(MemoryBufferRef F, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
parseAssemblyFile and parseAssemblyString are wrappers around this function.
bool parseAssemblyInto(MemoryBufferRef F, Module *M, ModuleSummaryIndex *Index, SMDiagnostic &Err, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
This function is the low-level interface to the LLVM Assembly Parser.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
std::unique_ptr< Module > parseAssemblyFile(StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
This function is a main interface to the LLVM Assembly Parser.
This is an important base class in LLVM.
bool UpgradeDebugInfo(Module &M)
Check the debug info version number, if it is out-dated, drop the debug info.
ParsedModuleAndIndex parseAssemblyWithIndex(MemoryBufferRef F, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
Parse LLVM Assembly including the summary index from a MemoryBuffer.
ParsedModuleAndIndex parseAssemblyFileWithIndex(StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
This function is a main interface to the LLVM Assembly Parser.
std::unique_ptr< ModuleSummaryIndex > Index
This struct contains the mappings from the slot numbers to unnamed metadata nodes, global values and types.
Holds the Module and ModuleSummaryIndex returned by the interfaces that parse both.
StringRef - Represent a constant reference to a string, i.e.
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...