LLVM 20.0.0git
Classes | Public Types | Public Member Functions | List of all members
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)
 
bool Run (bool UpgradeDebugInfo, DataLayoutCallbackTy DataLayoutCallback=[](StringRef, StringRef) { return std::nullopt;})
 Run: module ::= toplevelentity*.
 
bool parseStandaloneConstantValue (Constant *&C, const SlotMapping *Slots)
 
bool parseTypeAtBeginning (Type *&Ty, unsigned &Read, const SlotMapping *Slots)
 
bool parseDIExpressionBodyAtBeginning (MDNode *&Result, unsigned &Read, const SlotMapping *Slots)
 
LLVMContextgetContext ()
 
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, DwarfLangField &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, 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, MDField &Result)
 
template<>
bool parseMDField (LocTy Loc, StringRef Name, MDSignedOrMDField &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 104 of file LLParser.h.

Member Typedef Documentation

◆ LocTy

Definition at line 106 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 
)
inline

Definition at line 187 of file LLParser.h.

Member Function Documentation

◆ getContext()

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

Definition at line 207 of file LLParser.h.

◆ parseDIExpressionBodyAtBeginning()

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

◆ parseMDField() [1/21]

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

◆ parseMDField() [2/21]

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

Definition at line 4742 of file LLParser.cpp.

References Name.

◆ parseMDField() [3/21]

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

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

Definition at line 4901 of file LLParser.cpp.

References llvm::lltok::APSInt, llvm::lltok::bar, llvm::lltok::DIFlag, llvm::LLLexer::getAPSIntVal(), llvm::DINode::getFlag(), llvm::LLLexer::getKind(), llvm::LLLexer::getStrVal(), llvm::APSInt::isSigned(), and llvm::LLLexer::Lex().

◆ parseMDField() [4/21]

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

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

Definition at line 4941 of file LLParser.cpp.

References llvm::lltok::APSInt, llvm::lltok::bar, llvm::lltok::DISPFlag, llvm::LLLexer::getAPSIntVal(), llvm::DISubprogram::getFlag(), llvm::LLLexer::getKind(), llvm::LLLexer::getStrVal(), llvm::APSInt::isSigned(), and llvm::LLLexer::Lex().

◆ parseMDField() [5/21]

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

◆ parseMDField() [6/21]

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

◆ parseMDField() [7/21]

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

◆ parseMDField() [8/21]

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

◆ parseMDField() [9/21]

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

◆ parseMDField() [10/21]

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

◆ parseMDField() [11/21]

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

◆ parseMDField() [12/21]

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

Definition at line 4738 of file LLParser.cpp.

References Name.

◆ parseMDField() [13/21]

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

◆ parseMDField() [14/21]

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

◆ parseMDField() [15/21]

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

◆ parseMDField() [16/21]

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

Definition at line 5067 of file LLParser.cpp.

◆ parseMDField() [17/21]

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

◆ parseMDField() [18/21]

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

Definition at line 5030 of file LLParser.cpp.

References llvm::lltok::APSInt, llvm::LLLexer::getKind(), and Name.

◆ parseMDField() [19/21]

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

Definition at line 5053 of file LLParser.cpp.

References error, llvm::MDString::get(), llvm::LLLexer::getLoc(), and Name.

◆ parseMDField() [20/21]

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

◆ parseMDField() [21/21]

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

◆ parseStandaloneConstantValue()

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

◆ parseTypeAtBeginning()

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

Definition at line 111 of file LLParser.cpp.

References End, llvm::LLLexer::getLoc(), llvm::LLLexer::Lex(), and llvm::Read.

Referenced by llvm::parseTypeAtBeginning().

◆ Run()

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

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