LLVM  14.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) { return None;})
 Run: module ::= toplevelentity*. More...
 
bool parseStandaloneConstantValue (Constant *&C, const SlotMapping *Slots)
 
bool parseTypeAtBeginning (Type *&Ty, 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. More...
 
template<>
bool parseMDField (LocTy Loc, StringRef Name, DISPFlagField &Result)
 DISPFlagField ::= uint32 ::= DISPFlagVector ::= DISPFlagVector '|' DISPFlag* '|' uint32. More...
 
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 84 of file LLParser.h.

Member Typedef Documentation

◆ LocTy

Definition at line 86 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 148 of file LLParser.h.

Member Function Documentation

◆ getContext()

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

Definition at line 162 of file LLParser.h.

References Context.

◆ 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 3947 of file LLParser.cpp.

◆ parseMDField() [3/21]

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

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

Definition at line 4106 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 4146 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 3943 of file LLParser.cpp.

◆ 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 4272 of file LLParser.cpp.

References move.

◆ 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 4235 of file LLParser.cpp.

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

◆ parseMDField() [19/21]

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

Definition at line 4258 of file LLParser.cpp.

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

◆ 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 98 of file LLParser.cpp.

References llvm::LLLexer::Lex().

◆ Run()

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

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