|
LLVM
10.0.0
|
A node in a MsgPack Document. More...
#include "llvm/BinaryFormat/MsgPackDocument.h"
Public Types | |
| typedef std::map< DocNode, DocNode > | MapTy |
| typedef std::vector< DocNode > | ArrayTy |
Public Member Functions | |
| DocNode () | |
| bool | isMap () const |
| bool | isArray () const |
| bool | isScalar () const |
| bool | isString () const |
| bool | isEmpty () const |
| Type | getKind () const |
| Document * | getDocument () const |
| int64_t & | getInt () |
| uint64_t & | getUInt () |
| bool & | getBool () |
| double & | getFloat () |
| int64_t | getInt () const |
| uint64_t | getUInt () const |
| bool | getBool () const |
| double | getFloat () const |
| StringRef | getString () const |
| ArrayDocNode & | getArray (bool Convert=false) |
| Get an ArrayDocNode for an array node. More... | |
| MapDocNode & | getMap (bool Convert=false) |
| Get a MapDocNode for a map node. More... | |
| std::string | toString () const |
| Convert this node to a string, assuming it is scalar. More... | |
| StringRef | fromString (StringRef S, StringRef Tag="") |
| Convert the StringRef and use it to set this DocNode (assuming scalar). More... | |
Protected Attributes | |
| union { | |
| int64_t Int | |
| uint64_t UInt | |
| bool Bool | |
| double Float | |
| StringRef Raw | |
| ArrayTy * Array | |
| MapTy * Map | |
| }; | |
Friends | |
| bool | operator< (const DocNode &Lhs, const DocNode &Rhs) |
| Comparison operator, used for map keys. More... | |
| bool | operator== (const DocNode &Lhs, const DocNode &Rhs) |
| Equality operator. More... | |
A node in a MsgPack Document.
This is a simple copyable and passable-by-value type that does not own any memory.
Definition at line 38 of file MsgPackDocument.h.
| typedef std::vector<DocNode> llvm::msgpack::DocNode::ArrayTy |
Definition at line 43 of file MsgPackDocument.h.
| typedef std::map<DocNode, DocNode> llvm::msgpack::DocNode::MapTy |
Definition at line 42 of file MsgPackDocument.h.
|
inline |
Definition at line 65 of file MsgPackDocument.h.
Convert the StringRef and use it to set this DocNode (assuming scalar).
If it is a string, copy the string into the Document's strings list so we do not rely on S having a lifetime beyond this call. Tag is "" or a YAML tag.
Definition at line 70 of file MsgPackDocumentYAML.cpp.
|
inline |
Get an ArrayDocNode for an array node.
If Convert, convert the node to an array node if necessary.
Definition at line 125 of file MsgPackDocument.h.
References llvm::msgpack::Array, and assert().
Referenced by llvm::yaml::PolymorphicTraits< DocNode >::getAsSequence(), and getStageName().
|
inline |
Definition at line 88 of file MsgPackDocument.h.
References assert(), and llvm::msgpack::Boolean.
|
inline |
Definition at line 108 of file MsgPackDocument.h.
References assert(), and llvm::msgpack::Boolean.
|
inline |
Definition at line 76 of file MsgPackDocument.h.
References llvm::msgpack::KindAndDocument::Doc.
Referenced by llvm::AMDGPU::HSAMD::MetadataStreamerV3::emitKernel(), llvm::AMDGPU::HSAMD::MetadataStreamerV2::emitKernel(), llvm::msgpack::MapDocNode::find(), llvm::yaml::CustomMappingTraits< MapDocNode >::inputOne(), llvm::msgpack::MapDocNode::operator[](), llvm::msgpack::ArrayDocNode::operator[](), and llvm::msgpack::ArrayDocNode::push_back().
|
inline |
Definition at line 93 of file MsgPackDocument.h.
References assert(), and llvm::msgpack::Float.
|
inline |
Definition at line 113 of file MsgPackDocument.h.
References assert(), and llvm::msgpack::Float.
|
inline |
Definition at line 78 of file MsgPackDocument.h.
References assert(), and llvm::msgpack::Int.
|
inline |
Definition at line 98 of file MsgPackDocument.h.
References assert(), and llvm::msgpack::Int.
|
inline |
Definition at line 75 of file MsgPackDocument.h.
References llvm::msgpack::KindAndDocument::Kind.
Referenced by llvm::yaml::PolymorphicTraits< DocNode >::getKind().
|
inline |
Get a MapDocNode for a map node.
If Convert, convert the node to a map node if necessary.
Definition at line 136 of file MsgPackDocument.h.
References assert(), and llvm::msgpack::Map.
Referenced by llvm::yaml::PolymorphicTraits< DocNode >::getAsMap(), getStageName(), llvm::yaml::CustomMappingTraits< MapDocNode >::inputOne(), llvm::yaml::CustomMappingTraits< MapDocNode >::output(), and llvm::AMDGPU::HSAMD::V3::MetadataVerifier::verify().
|
inline |
Definition at line 118 of file MsgPackDocument.h.
References assert(), and llvm::msgpack::String.
|
inline |
Definition at line 83 of file MsgPackDocument.h.
References assert(), and llvm::msgpack::UInt.
|
inline |
Definition at line 103 of file MsgPackDocument.h.
References assert(), and llvm::msgpack::UInt.
|
inline |
Definition at line 69 of file MsgPackDocument.h.
References llvm::msgpack::Array.
|
inline |
Definition at line 74 of file MsgPackDocument.h.
Referenced by llvm::msgpack::MapDocNode::operator[]().
|
inline |
Definition at line 68 of file MsgPackDocument.h.
References llvm::msgpack::Map.
Referenced by llvm::AMDGPU::HSAMD::V3::MetadataVerifier::verify().
|
inline |
Definition at line 70 of file MsgPackDocument.h.
References isArray().
|
inline |
Definition at line 71 of file MsgPackDocument.h.
References llvm::msgpack::String.
| std::string DocNode::toString | ( | ) | const |
Convert this node to a string, assuming it is scalar.
Convert this DocNode to a string, assuming it is scalar.
Definition at line 36 of file MsgPackDocumentYAML.cpp.
References llvm::msgpack::Boolean, llvm::msgpack::Float, llvm::format(), llvm::msgpack::Int, llvm_unreachable, llvm::msgpack::Nil, llvm::raw_string_ostream::str(), llvm::msgpack::String, and llvm::msgpack::UInt.
Comparison operator, used for map keys.
Definition at line 146 of file MsgPackDocument.h.
Equality operator.
Definition at line 176 of file MsgPackDocument.h.
| union { ... } |
| ArrayTy* llvm::msgpack::DocNode::Array |
Definition at line 60 of file MsgPackDocument.h.
Referenced by llvm::msgpack::ArrayDocNode::operator[]().
| bool llvm::msgpack::DocNode::Bool |
Definition at line 57 of file MsgPackDocument.h.
| double llvm::msgpack::DocNode::Float |
Definition at line 58 of file MsgPackDocument.h.
| int64_t llvm::msgpack::DocNode::Int |
Definition at line 55 of file MsgPackDocument.h.
| MapTy* llvm::msgpack::DocNode::Map |
Definition at line 61 of file MsgPackDocument.h.
| StringRef llvm::msgpack::DocNode::Raw |
Definition at line 59 of file MsgPackDocument.h.
| uint64_t llvm::msgpack::DocNode::UInt |
Definition at line 56 of file MsgPackDocument.h.
1.8.13