clang-tools  11.0.0
Classes | Typedefs | Functions
clang::clangd::riff Namespace Reference

Classes

struct  Chunk
 
struct  File
 

Typedefs

using FourCC = std::array< char, 4 >
 

Functions

static llvm::Error makeError (const llvm::Twine &Msg)
 
llvm::Expected< ChunkreadChunk (llvm::StringRef &Stream)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, const Chunk &C)
 
llvm::Expected< FilereadFile (llvm::StringRef Stream)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, const File &F)
 
constexpr FourCC fourCC (const char(&Literal)[5])
 
constexpr llvm::StringRef fourCCStr (const FourCC &Data)
 
bool operator== (const Chunk &L, const Chunk &R)
 
bool operator== (const File &L, const File &R)
 

Typedef Documentation

◆ FourCC

using clang::clangd::riff::FourCC = typedef std::array<char, 4>

Definition at line 42 of file RIFF.h.

Function Documentation

◆ fourCC()

constexpr FourCC clang::clangd::riff::fourCC ( const char(&)  Literal[5])
inlineconstexpr

Definition at line 44 of file RIFF.h.

Referenced by readFile().

◆ fourCCStr()

constexpr llvm::StringRef clang::clangd::riff::fourCCStr ( const FourCC Data)
inlineconstexpr

Definition at line 47 of file RIFF.h.

Referenced by readFile().

◆ makeError()

static llvm::Error clang::clangd::riff::makeError ( const llvm::Twine &  Msg)
static

Definition at line 17 of file RIFF.cpp.

Referenced by readChunk(), and readFile().

◆ operator<<() [1/2]

llvm::raw_ostream & clang::clangd::riff::operator<< ( llvm::raw_ostream &  OS,
const Chunk C 
)

Definition at line 44 of file RIFF.cpp.

References clang::clangd::riff::Chunk::ID, and OS.

◆ operator<<() [2/2]

llvm::raw_ostream & clang::clangd::riff::operator<< ( llvm::raw_ostream &  OS,
const File F 
)

Definition at line 73 of file RIFF.cpp.

◆ operator==() [1/2]

bool clang::clangd::riff::operator== ( const Chunk L,
const Chunk R 
)
inline

Definition at line 55 of file RIFF.h.

References clang::clangd::riff::Chunk::Data, and clang::clangd::riff::Chunk::ID.

◆ operator==() [2/2]

bool clang::clangd::riff::operator== ( const File L,
const File R 
)
inline

Definition at line 63 of file RIFF.h.

References clang::clangd::riff::File::Chunks, and clang::clangd::riff::File::Type.

◆ readChunk()

llvm::Expected< Chunk > clang::clangd::riff::readChunk ( llvm::StringRef &  Stream)

Definition at line 22 of file RIFF.cpp.

References clang::clangd::riff::Chunk::Data, clang::clangd::riff::Chunk::ID, and makeError().

Referenced by readFile().

◆ readFile()

llvm::Expected< File > clang::clangd::riff::readFile ( llvm::StringRef  Stream)

Definition at line 55 of file RIFF.cpp.

References fourCC(), fourCCStr(), makeError(), readChunk(), and clang::clangd::RIFF.