|
LLVM
10.0.0
|
Regular YAML to Remark parser. More...
#include "Remarks/YAMLRemarkParser.h"
Public Member Functions | |
| YAMLRemarkParser (StringRef Buf) | |
| Expected< std::unique_ptr< Remark > > | next () override |
| If no error occurs, this returns a valid Remark object. More... | |
Public Member Functions inherited from llvm::remarks::RemarkParser | |
| RemarkParser (Format ParserFormat) | |
| virtual | ~RemarkParser ()=default |
Static Public Member Functions | |
| static bool | classof (const RemarkParser *P) |
Public Attributes | |
| Optional< ParsedStringTable > | StrTab |
| The string table used for parsing strings. More... | |
| std::string | LastErrorMessage |
| Last error message that can come from the YAML parser diagnostics. More... | |
| SourceMgr | SM |
| Source manager for better error messages. More... | |
| yaml::Stream | Stream |
| Stream for yaml parsing. More... | |
| yaml::document_iterator | YAMLIt |
| Iterator in the YAML stream. More... | |
| std::unique_ptr< MemoryBuffer > | SeparateBuf |
| If we parse remark metadata in separate mode, we need to open a new file and parse that. More... | |
Public Attributes inherited from llvm::remarks::RemarkParser | |
| Format | ParserFormat |
| The format of the parser. More... | |
| std::string | ExternalFilePrependPath |
| Path to prepend when opening an external remark file. More... | |
Regular YAML to Remark parser.
Definition at line 50 of file YAMLRemarkParser.h.
| YAMLRemarkParser::YAMLRemarkParser | ( | StringRef | Buf | ) |
Definition at line 170 of file YAMLRemarkParser.cpp.
References llvm::None.
|
protected |
Definition at line 173 of file YAMLRemarkParser.cpp.
References llvm::yaml::Stream::begin(), LastErrorMessage, setupSM(), SM, Stream, StrTab, llvm::remarks::YAML, and YAMLIt.
|
inlinestatic |
Definition at line 70 of file YAMLRemarkParser.h.
References error, llvm::remarks::RemarkParser::ParserFormat, llvm::parseType(), and llvm::remarks::YAML.
|
protected |
Create a YAMLParseError error from an existing error generated by the YAML parser.
If there is no error, this returns Success.
Definition at line 182 of file YAMLRemarkParser.cpp.
References E, LastErrorMessage, and llvm::Error::success().
Referenced by parseRemark().
|
protected |
Create a YAMLParseError error referencing a specific node.
Definition at line 178 of file YAMLRemarkParser.cpp.
If no error occurs, this returns a valid Remark object.
If an error of type EndOfFileError occurs, it is safe to recover from it by stopping the parsing. If any other error occurs, it should be propagated to the user. The pointer should never be null.
Implements llvm::remarks::RemarkParser.
Definition at line 414 of file YAMLRemarkParser.cpp.
References llvm::yaml::Stream::end(), parseRemark(), Stream, llvm::Expected< T >::takeError(), and YAMLIt.
|
protected |
Parse an argument.
Definition at line 363 of file YAMLRemarkParser.cpp.
Referenced by parseRemark().
|
protected |
Parse a debug location.
Definition at line 321 of file YAMLRemarkParser.cpp.
Referenced by parseRemark().
|
protected |
Parse one key to a string.
Definition at line 287 of file YAMLRemarkParser.cpp.
Referenced by parseRemark().
|
protected |
Parse a YAML remark to a remarks::Remark object.
Definition at line 191 of file YAMLRemarkParser.cpp.
References Arg, llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::createStringError(), llvm::dyn_cast(), E, error(), llvm::yaml::Document::getRoot(), llvm::make_error_code(), parseArg(), parseDebugLoc(), parseKey(), parseStr(), parseType(), parseUnsigned(), llvm::T, llvm::Expected< T >::takeError(), and llvm::remarks::Unknown.
Referenced by next().
|
protectedvirtual |
Parse one value to a string.
Reimplemented in llvm::remarks::YAMLStrTabRemarkParser.
Definition at line 294 of file YAMLRemarkParser.cpp.
Referenced by parseRemark().
|
protected |
Parse the type of a remark to an enum type.
Definition at line 273 of file YAMLRemarkParser.cpp.
Referenced by parseRemark().
|
protected |
Parse one value to an unsigned.
Definition at line 309 of file YAMLRemarkParser.cpp.
Referenced by parseRemark().
| std::string llvm::remarks::YAMLRemarkParser::LastErrorMessage |
Last error message that can come from the YAML parser diagnostics.
We need this for catching errors in the constructor.
Definition at line 55 of file YAMLRemarkParser.h.
Referenced by error(), and YAMLRemarkParser().
| 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 64 of file YAMLRemarkParser.h.
| SourceMgr llvm::remarks::YAMLRemarkParser::SM |
Source manager for better error messages.
Definition at line 57 of file YAMLRemarkParser.h.
Referenced by YAMLRemarkParser().
| yaml::Stream llvm::remarks::YAMLRemarkParser::Stream |
Stream for yaml parsing.
Definition at line 59 of file YAMLRemarkParser.h.
Referenced by next(), and YAMLRemarkParser().
| Optional<ParsedStringTable> llvm::remarks::YAMLRemarkParser::StrTab |
The string table used for parsing strings.
Definition at line 52 of file YAMLRemarkParser.h.
Referenced by YAMLRemarkParser().
| yaml::document_iterator llvm::remarks::YAMLRemarkParser::YAMLIt |
Iterator in the YAML stream.
Definition at line 61 of file YAMLRemarkParser.h.
Referenced by next(), and YAMLRemarkParser().
1.8.13