LLVM
8.0.1
|
Reads MessagePack objects from memory, one at a time. More...
#include "llvm/BinaryFormat/MsgPackReader.h"
Public Member Functions | |
Reader (MemoryBufferRef InputBuffer) | |
Construct a reader, keeping a reference to the InputBuffer . More... | |
Reader (StringRef Input) | |
Construct a reader, keeping a reference to the Input . More... | |
Reader (const Reader &)=delete | |
Reader & | operator= (const Reader &)=delete |
Expected< bool > | read (Object &Obj) |
Read one object from the input buffer, advancing past it. More... | |
template<class T > | |
Expected< bool > | readRaw (Object &Obj) |
template<class T > | |
Expected< bool > | readInt (Object &Obj) |
template<class T > | |
Expected< bool > | readUInt (Object &Obj) |
template<class T > | |
Expected< bool > | readLength (Object &Obj) |
template<class T > | |
Expected< bool > | readExt (Object &Obj) |
Reads MessagePack objects from memory, one at a time.
Definition at line 99 of file MsgPackReader.h.
Reader::Reader | ( | MemoryBufferRef | InputBuffer | ) |
Construct a reader, keeping a reference to the InputBuffer
.
Definition at line 23 of file MsgPackReader.cpp.
Reader::Reader | ( | StringRef | Input | ) |
Construct a reader, keeping a reference to the Input
.
Definition at line 27 of file MsgPackReader.cpp.
Read one object from the input buffer, advancing past it.
The Obj
is updated with the kind of the object read, and the corresponding union member is updated.
For the collection objects (Array and Map), only the length is read, and the caller must make and additional N
calls (in the case of Array) or N*2
calls (in the case of Map) to Read
to retrieve the collection elements.
[out] | Obj | filled with next object on success. |
Obj
was not updated), otherwise an error. Definition at line 29 of file MsgPackReader.cpp.
References llvm::msgpack::Array, llvm::msgpack::Binary, llvm::BitsToDouble(), llvm::BitsToFloat(), llvm::msgpack::Object::Bool, llvm::msgpack::Boolean, llvm::msgpack::Extension, llvm::msgpack::Float, llvm::msgpack::Object::Float, I, llvm::msgpack::Int, llvm::msgpack::Object::Int, llvm::pdb::Int8, llvm::msgpack::Object::Kind, llvm::msgpack::Object::Length, llvm::make_error_code(), llvm::msgpack::Map, llvm::Intrinsic::memcpy, llvm::msgpack::Nil, Size, llvm::msgpack::String, llvm::msgpack::UInt, llvm::msgpack::Object::UInt, and llvm::pdb::UInt8.
Referenced by llvm::msgpack::Node::read().
Definition at line 222 of file MsgPackReader.cpp.
References llvm::msgpack::ExtensionType::Bytes, llvm::msgpack::Object::Extension, llvm::make_error_code(), llvm::msgpack::Object::Raw, Size, T, and llvm::msgpack::ExtensionType::Type.
Definition at line 192 of file MsgPackReader.cpp.
References llvm::msgpack::Object::Int, llvm::make_error_code(), and T.
Definition at line 212 of file MsgPackReader.cpp.
References llvm::msgpack::Object::Length, llvm::make_error_code(), and T.
Definition at line 182 of file MsgPackReader.cpp.
References llvm::make_error_code(), Size, and T.
Definition at line 202 of file MsgPackReader.cpp.
References llvm::make_error_code(), T, and llvm::msgpack::Object::UInt.