LLVM 24.0.0git
llvm::LLParser Class Reference

#include "llvm/AsmParser/LLParser.h"

Public Types

typedef LLLexer::LocTy LocTy

Public Member Functions

 LLParser (StringRef F, SourceMgr &SM, SMDiagnostic &Err, Module *M, ModuleSummaryIndex *Index, LLVMContext &Context, SlotMapping *Slots=nullptr, AsmParserContext *ParserContext=nullptr)
LLVM_ABI bool Run (bool UpgradeDebugInfo, DataLayoutCallbackTy DataLayoutCallback=[](StringRef, StringRef) { return std::nullopt;})
 Run: module ::= toplevelentity*.
LLVM_ABI bool parseStandaloneConstantValue (Constant *&C, const SlotMapping *Slots)
LLVM_ABI bool parseTypeAtBeginning (Type *&Ty, unsigned &Read, const SlotMapping *Slots)
LLVM_ABI bool parseDIExpressionBodyAtBeginning (MDNode *&Result, unsigned &Read, const SlotMapping *Slots)
LLVM_ABI bool parseMetadataDefinitions (SlotMapping &Slots, ArrayRef< SMLoc > DefinitionEnds)
LLVMContext & getContext ()
template<>
bool parseMDField (LocTy Loc, StringRef Name, MDAPSIntField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, MDUnsignedField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, LineField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, ColumnField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, DwarfTagField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, DwarfMacinfoTypeField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, DwarfVirtualityField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, DwarfEnumKindField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, DwarfLangField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, DwarfSourceLangNameField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, DwarfLangDialectField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, DwarfCCField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, EmissionKindField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, FixedPointKindField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, NameTableKindField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, DwarfAttEncodingField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, DIFlagField &Result)
 DIFlagField ::= uint32 ::= DIFlagVector ::= DIFlagVector '|' DIFlagFwdDecl '|' uint32 '|' DIFlagPublic.
template<>
bool parseMDField (LocTy Loc, StringRef Name, DISPFlagField &Result)
 DISPFlagField ::= uint32 ::= DISPFlagVector ::= DISPFlagVector '|' DISPFlag* '|' uint32.
template<>
bool parseMDField (LocTy Loc, StringRef Name, MDSignedField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, MDBoolField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, MDNodeField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, MDField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, MDSignedOrMDField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, MDUnsignedOrMDField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, MDStringField &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, MDFieldList &Result)
template<>
bool parseMDField (LocTy Loc, StringRef Name, ChecksumKindField &Result)

Detailed Description

Definition at line 109 of file LLParser.h.

Member Typedef Documentation

◆ LocTy

Definition at line 111 of file LLParser.h.

Constructor & Destructor Documentation

◆ LLParser()

llvm::LLParser::LLParser ( StringRef F,
SourceMgr & SM,
SMDiagnostic & Err,
Module * M,
ModuleSummaryIndex * Index,
LLVMContext & Context,
SlotMapping * Slots = nullptr,
AsmParserContext * ParserContext = nullptr )
inline

Definition at line 217 of file LLParser.h.

References F.

Member Function Documentation

◆ getContext()

LLVMContext & llvm::LLParser::getContext ( )
inline

Definition at line 243 of file LLParser.h.

◆ parseDIExpressionBodyAtBeginning()

bool LLParser::parseDIExpressionBodyAtBeginning ( MDNode *& Result,
unsigned & Read,
const SlotMapping * Slots )

Definition at line 171 of file LLParser.cpp.

References llvm::End, and llvm::Read.

Referenced by llvm::parseDIExpressionBodyAtBeginning().

◆ parseMDField() [1/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
ChecksumKindField & Result )

Definition at line 5818 of file LLParser.cpp.

References llvm::lltok::ChecksumKind, and llvm::DIFile::getChecksumKind().

◆ parseMDField() [2/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
ColumnField & Result )

Definition at line 5346 of file LLParser.cpp.

◆ parseMDField() [3/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
DIFlagField & Result )

DIFlagField ::= uint32 ::= DIFlagVector ::= DIFlagVector '|' DIFlagFwdDecl '|' uint32 '|' DIFlagPublic.

Definition at line 5592 of file LLParser.cpp.

References llvm::lltok::APSInt, llvm::lltok::bar, llvm::lltok::DIFlag, and llvm::DINode::getFlag().

◆ parseMDField() [4/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
DISPFlagField & Result )

DISPFlagField ::= uint32 ::= DISPFlagVector ::= DISPFlagVector '|' DISPFlag* '|' uint32.

Definition at line 5632 of file LLParser.cpp.

References llvm::lltok::APSInt, llvm::lltok::bar, llvm::lltok::DISPFlag, and llvm::DISubprogram::getFlag().

◆ parseMDField() [5/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
DwarfAttEncodingField & Result )

◆ parseMDField() [6/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
DwarfCCField & Result )

◆ parseMDField() [7/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
DwarfEnumKindField & Result )

◆ parseMDField() [8/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
DwarfLangDialectField & Result )

◆ parseMDField() [9/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
DwarfLangField & Result )

◆ parseMDField() [10/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
DwarfMacinfoTypeField & Result )

◆ parseMDField() [11/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
DwarfSourceLangNameField & Result )

◆ parseMDField() [12/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
DwarfTagField & Result )

◆ parseMDField() [13/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
DwarfVirtualityField & Result )

◆ parseMDField() [14/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
EmissionKindField & Result )

◆ parseMDField() [15/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
FixedPointKindField & Result )

◆ parseMDField() [16/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
LineField & Result )

Definition at line 5342 of file LLParser.cpp.

◆ parseMDField() [17/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
MDAPSIntField & Result )

Definition at line 5316 of file LLParser.cpp.

References llvm::lltok::APSInt.

◆ parseMDField() [18/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
MDBoolField & Result )

Definition at line 5687 of file LLParser.cpp.

References llvm::lltok::kw_false, and llvm::lltok::kw_true.

◆ parseMDField() [19/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
MDField & Result )

Definition at line 5721 of file LLParser.cpp.

References llvm::lltok::kw_null.

◆ parseMDField() [20/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
MDFieldList & Result )

Definition at line 5808 of file LLParser.cpp.

◆ parseMDField() [21/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
MDNodeField & Result )

Definition at line 5703 of file LLParser.cpp.

References llvm::lltok::kw_null.

◆ parseMDField() [22/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
MDSignedField & Result )

Definition at line 5668 of file LLParser.cpp.

References llvm::lltok::APSInt, and assert().

◆ parseMDField() [23/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
MDSignedOrMDField & Result )

Definition at line 5739 of file LLParser.cpp.

References llvm::lltok::APSInt.

◆ parseMDField() [24/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
MDStringField & Result )

Definition at line 5785 of file LLParser.cpp.

References error, and llvm::MDString::get().

◆ parseMDField() [25/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
MDUnsignedField & Result )

Definition at line 5326 of file LLParser.cpp.

References llvm::lltok::APSInt, and assert().

◆ parseMDField() [26/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
MDUnsignedOrMDField & Result )

Definition at line 5762 of file LLParser.cpp.

References llvm::lltok::APSInt.

◆ parseMDField() [27/27]

template<>
bool llvm::LLParser::parseMDField ( LocTy Loc,
StringRef Name,
NameTableKindField & Result )

◆ parseMetadataDefinitions()

bool LLParser::parseMetadataDefinitions ( SlotMapping & Slots,
ArrayRef< SMLoc > DefinitionEnds )

◆ parseStandaloneConstantValue()

bool LLParser::parseStandaloneConstantValue ( Constant *& C,
const SlotMapping * Slots )

Definition at line 142 of file LLParser.cpp.

References C(), llvm::lltok::Eof, and error.

Referenced by llvm::parseConstantValue().

◆ parseTypeAtBeginning()

bool LLParser::parseTypeAtBeginning ( Type *& Ty,
unsigned & Read,
const SlotMapping * Slots )

Definition at line 155 of file LLParser.cpp.

References llvm::End, and llvm::Read.

Referenced by llvm::parseTypeAtBeginning().

◆ Run()

bool LLParser::Run ( bool UpgradeDebugInfo,
DataLayoutCallbackTy DataLayoutCallback = [](StringRef, StringRef) { return std::nullopt; } )

Run: module ::= toplevelentity*.

Definition at line 123 of file LLParser.cpp.

References error, and llvm::UpgradeDebugInfo().

Referenced by parseAssemblyInto(), and parseSummaryIndexAssemblyInto().


The documentation for this class was generated from the following files: