10 #ifndef LLVM_DEBUGINFO_MSF_STREAMWRITER_H
11 #define LLVM_DEBUGINFO_MSF_STREAMWRITER_H
20 #include <type_traits>
46 static_cast<typename std::underlying_type<T>::type
>(Num));
50 static_assert(!std::is_pointer<T>::value,
51 "writeObject should not be used with pointers, to write "
52 "the pointed-to value dereference the pointer before calling "
62 if (Array.
size() > UINT32_MAX /
sizeof(
T))
67 Array.
size() *
sizeof(
T)));
70 template <
typename T,
typename U>
92 #endif // LLVM_DEBUGINFO_MSF_STREAMWRITER_H
void setOffset(uint32_t Off)
Error writeZeroString(StringRef Str)
Error writeArray(FixedStreamArray< T > Array)
Error writeFixedString(StringRef Str)
Error writeArray(VarStreamArray< T, U > Array)
Error writeStreamRef(ReadableStreamRef Ref)
Error writeObject(const T &Obj)
ReadableStreamRef getUnderlyingStream() const
size_t size() const
size - Get the array size.
Error writeBytes(ArrayRef< uint8_t > Buffer)
ReadableStreamRef getUnderlyingStream() const
uint32_t getLength() const
bool empty() const
empty - Check if the array is empty.
Error writeInteger(uint8_t Int)
Error writeArray(ArrayRef< T > Array)
static ErrorSuccess success()
Create a success value.
uint32_t getOffset() const
uint32_t getLength() const
Lightweight error class with error context and mandatory checking.
uint32_t bytesRemaining() const
StringRef - Represent a constant reference to a string, i.e.