LLVM: llvm::remarks::YAMLRemarkParser Struct Reference (original) (raw)
Regular YAML to Remark parser. More...
#include "[Remarks/YAMLRemarkParser.h](YAMLRemarkParser%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| YAMLRemarkParser (StringRef Buf) | |
| Expected< std::unique_ptr< Remark > > | next () override |
| If no error occurs, this returns a valid Remark object. | |
| Public Member Functions inherited from llvm::remarks::RemarkParser | |
| RemarkParser (Format ParserFormat) | |
| virtual | ~RemarkParser ()=default |
| Public Attributes | |
|---|---|
| std::string | LastErrorMessage |
| Last error message that can come from the YAML parser diagnostics. | |
| SourceMgr | SM |
| Source manager for better error messages. | |
| yaml::Stream | Stream |
| Stream for yaml parsing. | |
| yaml::document_iterator | YAMLIt |
| Iterator in the YAML stream. | |
| std::unique_ptr< MemoryBuffer > | SeparateBuf |
| If we parse remark metadata in separate mode, we need to open a new file and parse that. | |
| Public Attributes inherited from llvm::remarks::RemarkParser | |
| Format | ParserFormat |
| The format of the parser. | |
| std::string | ExternalFilePrependPath |
| Path to prepend when opening an external remark file. |
| Protected Member Functions | |
|---|---|
| Error | error () |
| Create a YAMLParseError error from an existing error generated by the YAML parser. | |
| Error | error (StringRef Message, yaml::Node &Node) |
| Create a YAMLParseError error referencing a specific node. | |
| Expected< std::unique_ptr< Remark > > | parseRemark (yaml::Document &Remark) |
| Parse a YAML remark to a remarks::Remark object. | |
| Expected< Type > | parseType (yaml::MappingNode &Node) |
| Parse the type of a remark to an enum type. | |
| Expected< StringRef > | parseKey (yaml::KeyValueNode &Node) |
| Parse one key to a string. | |
| virtual Expected< StringRef > | parseStr (yaml::KeyValueNode &Node) |
| Parse one value to a string. | |
| Expected< unsigned > | parseUnsigned (yaml::KeyValueNode &Node) |
| Parse one value to an unsigned. | |
| Expected< RemarkLocation > | parseDebugLoc (yaml::KeyValueNode &Node) |
| Parse a debug location. | |
| Expected< Argument > | parseArg (yaml::Node &Node) |
| Parse an argument. |
Regular YAML to Remark parser.
Definition at line 48 of file YAMLRemarkParser.h.
| YAMLRemarkParser::YAMLRemarkParser | ( | StringRef | Buf | ) |
|---|
◆ classof()
◆ error() [1/2]
| Error YAMLRemarkParser::error ( ) | protected |
|---|
◆ error() [2/2]
◆ next()
| Expected< std::unique_ptr< Remark > > YAMLRemarkParser::next ( ) | overridevirtual |
|---|
◆ parseArg()
◆ parseDebugLoc()
◆ parseKey()
◆ parseRemark()
Parse a YAML remark to a remarks::Remark object.
Definition at line 164 of file YAMLRemarkParser.cpp.
References llvm::remarks::Remark::Args, llvm::createStringError(), llvm::dyn_cast(), llvm::StringRef::empty(), error(), llvm::remarks::Remark::FunctionName, llvm::yaml::Document::getRoot(), llvm::remarks::Remark::Hotness, llvm::remarks::Remark::Loc, parseArg(), parseDebugLoc(), parseKey(), parseStr(), parseType(), parseUnsigned(), llvm::remarks::Remark::PassName, llvm::remarks::Remark::RemarkName, llvm::remarks::Remark::RemarkType, T, llvm::Expected< T >::takeError(), and llvm::remarks::Unknown.
Referenced by next().
◆ parseStr()
◆ parseType()
Parse the type of a remark to an enum type.
Definition at line 246 of file YAMLRemarkParser.cpp.
References llvm::remarks::Analysis, llvm::remarks::AnalysisAliasing, llvm::remarks::AnalysisFPCommute, llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), error(), llvm::remarks::Failure, llvm::remarks::Missed, llvm::remarks::Passed, and llvm::remarks::Unknown.
Referenced by parseRemark().
◆ parseUnsigned()
◆ LastErrorMessage
std::string llvm::remarks::YAMLRemarkParser::LastErrorMessage
◆ SeparateBuf
std::unique_ptr<MemoryBuffer> llvm::remarks::YAMLRemarkParser::SeparateBuf
If we parse remark metadata in separate mode, we need to open a new file and parse that.
Definition at line 60 of file YAMLRemarkParser.h.
◆ SM
SourceMgr llvm::remarks::YAMLRemarkParser::SM
◆ Stream
◆ YAMLIt
The documentation for this struct was generated from the following files:
- lib/Remarks/YAMLRemarkParser.h
- lib/Remarks/YAMLRemarkParser.cpp