LLVM 20.0.0git
|
#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) |
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, 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) |
Definition at line 104 of file LLParser.h.
typedef LLLexer::LocTy llvm::LLParser::LocTy |
Definition at line 106 of file LLParser.h.
|
inline |
Definition at line 187 of file LLParser.h.
|
inline |
Definition at line 207 of file LLParser.h.
bool LLParser::parseDIExpressionBodyAtBeginning | ( | MDNode *& | Result, |
unsigned & | Read, | ||
const SlotMapping * | Slots | ||
) |
Definition at line 127 of file LLParser.cpp.
References End, llvm::LLLexer::getLoc(), and llvm::LLLexer::Lex().
Referenced by llvm::parseDIExpressionBodyAtBeginning().
bool llvm::LLParser::parseMDField | ( | LocTy | Loc, |
StringRef | Name, | ||
ChecksumKindField & | Result | ||
) |
Definition at line 5077 of file LLParser.cpp.
References llvm::lltok::ChecksumKind, llvm::DIFile::getChecksumKind(), llvm::LLLexer::getKind(), llvm::LLLexer::getStrVal(), and llvm::LLLexer::Lex().
Definition at line 4742 of file LLParser.cpp.
References Name.
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().
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().
bool llvm::LLParser::parseMDField | ( | LocTy | Loc, |
StringRef | Name, | ||
DwarfAttEncodingField & | Result | ||
) |
Definition at line 4878 of file LLParser.cpp.
References llvm::lltok::APSInt, assert(), llvm::lltok::DwarfAttEncoding, llvm::dwarf::getAttributeEncoding(), llvm::LLLexer::getKind(), llvm::LLLexer::getStrVal(), llvm::LLLexer::Lex(), and Name.
Definition at line 4822 of file LLParser.cpp.
References llvm::lltok::APSInt, assert(), CC, llvm::lltok::DwarfCC, llvm::dwarf::getCallingConvention(), llvm::LLLexer::getKind(), llvm::LLLexer::getStrVal(), llvm::LLLexer::Lex(), and Name.
Definition at line 4804 of file LLParser.cpp.
References llvm::lltok::APSInt, assert(), llvm::lltok::DwarfLang, llvm::LLLexer::getKind(), llvm::dwarf::getLanguage(), llvm::LLLexer::getStrVal(), llvm::LLLexer::Lex(), and Name.
bool llvm::LLParser::parseMDField | ( | LocTy | Loc, |
StringRef | Name, | ||
DwarfMacinfoTypeField & | Result | ||
) |
Definition at line 4765 of file LLParser.cpp.
References llvm::lltok::APSInt, assert(), llvm::dwarf::DW_MACINFO_invalid, llvm::lltok::DwarfMacinfo, llvm::LLLexer::getKind(), llvm::dwarf::getMacinfo(), llvm::LLLexer::getStrVal(), llvm::LLLexer::Lex(), and Name.
Definition at line 4747 of file LLParser.cpp.
References llvm::lltok::APSInt, assert(), llvm::dwarf::DW_TAG_invalid, llvm::lltok::DwarfTag, llvm::LLLexer::getKind(), llvm::LLLexer::getStrVal(), llvm::dwarf::getTag(), llvm::LLLexer::Lex(), and Name.
bool llvm::LLParser::parseMDField | ( | LocTy | Loc, |
StringRef | Name, | ||
DwarfVirtualityField & | Result | ||
) |
Definition at line 4785 of file LLParser.cpp.
References llvm::lltok::APSInt, assert(), llvm::dwarf::DW_VIRTUALITY_invalid, llvm::lltok::DwarfVirtuality, llvm::LLLexer::getKind(), llvm::LLLexer::getStrVal(), llvm::dwarf::getVirtuality(), llvm::LLLexer::Lex(), and Name.
bool llvm::LLParser::parseMDField | ( | LocTy | Loc, |
StringRef | Name, | ||
EmissionKindField & | Result | ||
) |
Definition at line 4840 of file LLParser.cpp.
References llvm::lltok::APSInt, assert(), llvm::lltok::EmissionKind, llvm::DICompileUnit::getEmissionKind(), llvm::LLLexer::getKind(), llvm::LLLexer::getStrVal(), llvm::LLLexer::Lex(), and Name.
Definition at line 4738 of file LLParser.cpp.
References Name.
Definition at line 4712 of file LLParser.cpp.
References llvm::lltok::APSInt, llvm::LLLexer::getAPSIntVal(), llvm::LLLexer::getKind(), and llvm::LLLexer::Lex().
Definition at line 4996 of file LLParser.cpp.
References llvm::LLLexer::getKind(), llvm::lltok::kw_false, llvm::lltok::kw_true, and llvm::LLLexer::Lex().
Definition at line 5012 of file LLParser.cpp.
References llvm::LLLexer::getKind(), llvm::lltok::kw_null, llvm::LLLexer::Lex(), and Name.
Definition at line 5067 of file LLParser.cpp.
Definition at line 4977 of file LLParser.cpp.
References llvm::lltok::APSInt, assert(), llvm::LLLexer::getAPSIntVal(), llvm::LLLexer::getKind(), llvm::LLLexer::Lex(), and Name.
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.
Definition at line 5053 of file LLParser.cpp.
References error, llvm::MDString::get(), llvm::LLLexer::getLoc(), and Name.
bool llvm::LLParser::parseMDField | ( | LocTy | Loc, |
StringRef | Name, | ||
MDUnsignedField & | Result | ||
) |
Definition at line 4722 of file LLParser.cpp.
References llvm::lltok::APSInt, assert(), llvm::LLLexer::getAPSIntVal(), llvm::LLLexer::getKind(), llvm::APSInt::isSigned(), llvm::LLLexer::Lex(), and Name.
bool llvm::LLParser::parseMDField | ( | LocTy | Loc, |
StringRef | Name, | ||
NameTableKindField & | Result | ||
) |
Definition at line 4859 of file LLParser.cpp.
References llvm::lltok::APSInt, assert(), llvm::LLLexer::getKind(), llvm::DICompileUnit::getNameTableKind(), llvm::LLLexer::getStrVal(), llvm::LLLexer::Lex(), Name, and llvm::lltok::NameTableKind.
bool LLParser::parseStandaloneConstantValue | ( | Constant *& | C, |
const SlotMapping * | Slots | ||
) |
Definition at line 98 of file LLParser.cpp.
References llvm::CallingConv::C, llvm::lltok::Eof, error, llvm::LLLexer::getKind(), llvm::LLLexer::getLoc(), and llvm::LLLexer::Lex().
Referenced by llvm::parseConstantValue().
bool LLParser::parseTypeAtBeginning | ( | Type *& | Ty, |
unsigned & | Read, | ||
const SlotMapping * | Slots | ||
) |
Definition at line 111 of file LLParser.cpp.
References End, llvm::LLLexer::getLoc(), and llvm::LLLexer::Lex().
Referenced by llvm::parseTypeAtBeginning().
bool LLParser::Run | ( | bool | UpgradeDebugInfo, |
DataLayoutCallbackTy | DataLayoutCallback = [](StringRef, StringRef) { return std::nullopt; } |
||
) |
Run: module ::= toplevelentity*.
Definition at line 79 of file LLParser.cpp.
References error, llvm::LLLexer::getLoc(), llvm::LLLexer::Lex(), llvm::LLVMContext::shouldDiscardValueNames(), and llvm::UpgradeDebugInfo().
Referenced by parseAssemblyInto(), and parseSummaryIndexAssemblyInto().