CppInterOp
C++ Language Interoperability Layer
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CppInterOp::Tracing::ReproBuffer Struct Reference

Internal helper to stringify arguments into a C++ call format. More...

#include "lib/CppInterOp/Tracing.h"

Collaboration diagram for CppInterOp::Tracing::ReproBuffer:
Collaboration graph
[legend]

Public Member Functions

 ReproBuffer ()
 
void append (Cpp::DeclRef h)
 
void append (Cpp::TypeRef h)
 
void append (Cpp::FuncRef h)
 
void append (Cpp::ObjectRef h)
 
void append (Cpp::InterpRef h)
 
void append (Cpp::ConstDeclRef h)
 
void append (Cpp::ConstTypeRef h)
 
void append (Cpp::ConstFuncRef h)
 
void append (const void *p)
 
void appendRaw (std::string_view s)
 
void append (const char *s)
 
void append (const std::string &s)
 
void append (bool v)
 
void append (int v)
 
void append (unsigned v)
 
void append (long v)
 
void append (unsigned long v)
 
void append (long long v)
 
void append (unsigned long long v)
 
void append (double d)
 
void append (float f)
 
template<typename T >
void append (const std::vector< T > &V)
 
void append (const Cpp::TemplateArgInfo &tai)
 
template<typename T , std::enable_if_t< std::is_enum_v< T >, int > = 0>
void append (T v)
 
template<typename T , std::enable_if_t<!std::is_enum_v< T > &&!std::is_pointer_v< T >, int > = 0>
void append (const T &)
 
template<typename... Args>
void format (llvm::ArrayRef< unsigned > OutIndices, Args &&... args)
 Format a comma-separated argument list.
 

Static Public Member Functions

static std::string parseEnumName (const char *sig)
 

Public Attributes

llvm::SmallString< 128 > Buffer
 
llvm::raw_svector_ostream OS
 

Detailed Description

Internal helper to stringify arguments into a C++ call format.

Definition at line 307 of file Tracing.h.

Constructor & Destructor Documentation

◆ ReproBuffer()

CppInterOp::Tracing::ReproBuffer::ReproBuffer ( )
inline

Definition at line 311 of file Tracing.h.

Member Function Documentation

◆ append() [1/24]

void CppInterOp::Tracing::ReproBuffer::append ( bool  v)
inline

Definition at line 366 of file Tracing.h.

References OS.

◆ append() [2/24]

void CppInterOp::Tracing::ReproBuffer::append ( const char *  s)
inline

Definition at line 360 of file Tracing.h.

References appendRaw().

◆ append() [3/24]

void CppInterOp::Tracing::ReproBuffer::append ( const Cpp::TemplateArgInfo &  tai)
inline

Definition at line 395 of file Tracing.h.

References append(), appendRaw(), and OS.

◆ append() [4/24]

void CppInterOp::Tracing::ReproBuffer::append ( const std::string &  s)
inline

Definition at line 363 of file Tracing.h.

References appendRaw().

◆ append() [5/24]

template<typename T >
void CppInterOp::Tracing::ReproBuffer::append ( const std::vector< T > &  V)
inline

Definition at line 378 of file Tracing.h.

References append(), and OS.

◆ append() [6/24]

template<typename T , std::enable_if_t<!std::is_enum_v< T > &&!std::is_pointer_v< T >, int > = 0>
void CppInterOp::Tracing::ReproBuffer::append ( const T &  )
inline

Definition at line 447 of file Tracing.h.

References OS.

◆ append() [7/24]

void CppInterOp::Tracing::ReproBuffer::append ( const void *  p)
inline

◆ append() [8/24]

void CppInterOp::Tracing::ReproBuffer::append ( Cpp::ConstDeclRef  h)
inline

Definition at line 319 of file Tracing.h.

References append().

Referenced by append().

◆ append() [9/24]

void CppInterOp::Tracing::ReproBuffer::append ( Cpp::ConstFuncRef  h)
inline

Definition at line 321 of file Tracing.h.

References append().

Referenced by append().

◆ append() [10/24]

void CppInterOp::Tracing::ReproBuffer::append ( Cpp::ConstTypeRef  h)
inline

Definition at line 320 of file Tracing.h.

References append().

Referenced by append().

◆ append() [11/24]

void CppInterOp::Tracing::ReproBuffer::append ( Cpp::DeclRef  h)
inline

Definition at line 314 of file Tracing.h.

References append().

Referenced by append(), append(), append(), and format().

◆ append() [12/24]

void CppInterOp::Tracing::ReproBuffer::append ( Cpp::FuncRef  h)
inline

Definition at line 316 of file Tracing.h.

References append().

Referenced by append().

◆ append() [13/24]

void CppInterOp::Tracing::ReproBuffer::append ( Cpp::InterpRef  h)
inline

Definition at line 318 of file Tracing.h.

References append().

Referenced by append().

◆ append() [14/24]

void CppInterOp::Tracing::ReproBuffer::append ( Cpp::ObjectRef  h)
inline

Definition at line 317 of file Tracing.h.

References append().

Referenced by append().

◆ append() [15/24]

void CppInterOp::Tracing::ReproBuffer::append ( Cpp::TypeRef  h)
inline

Definition at line 315 of file Tracing.h.

References append().

Referenced by append().

◆ append() [16/24]

void CppInterOp::Tracing::ReproBuffer::append ( double  d)
inline

Definition at line 373 of file Tracing.h.

References OS.

◆ append() [17/24]

void CppInterOp::Tracing::ReproBuffer::append ( float  f)
inline

Definition at line 374 of file Tracing.h.

References OS.

◆ append() [18/24]

void CppInterOp::Tracing::ReproBuffer::append ( int  v)
inline

Definition at line 367 of file Tracing.h.

References OS.

◆ append() [19/24]

void CppInterOp::Tracing::ReproBuffer::append ( long long  v)
inline

Definition at line 371 of file Tracing.h.

References OS.

◆ append() [20/24]

void CppInterOp::Tracing::ReproBuffer::append ( long  v)
inline

Definition at line 369 of file Tracing.h.

References OS.

◆ append() [21/24]

template<typename T , std::enable_if_t< std::is_enum_v< T >, int > = 0>
void CppInterOp::Tracing::ReproBuffer::append ( v)
inline

Definition at line 434 of file Tracing.h.

References OS, and parseEnumName().

◆ append() [22/24]

void CppInterOp::Tracing::ReproBuffer::append ( unsigned long long  v)
inline

Definition at line 372 of file Tracing.h.

References OS.

◆ append() [23/24]

void CppInterOp::Tracing::ReproBuffer::append ( unsigned long  v)
inline

Definition at line 370 of file Tracing.h.

References OS.

◆ append() [24/24]

void CppInterOp::Tracing::ReproBuffer::append ( unsigned  v)
inline

Definition at line 368 of file Tracing.h.

References OS.

◆ appendRaw()

void CppInterOp::Tracing::ReproBuffer::appendRaw ( std::string_view  s)
inline

Definition at line 344 of file Tracing.h.

References OS.

Referenced by append(), append(), and append().

◆ format()

template<typename... Args>
void CppInterOp::Tracing::ReproBuffer::format ( llvm::ArrayRef< unsigned >  OutIndices,
Args &&...  args 
)
inline

Format a comma-separated argument list.

Pointer-container OUTs emit _outN (next index from OutIndices); scalar pointer OUTs emit nullptr (the replay does not consume the value); non-pointer containers are skipped, matching the legacy rendering.

Definition at line 456 of file Tracing.h.

References append(), and OS.

Referenced by CppInterOp::Tracing::TraceRegion::TraceRegion().

◆ parseEnumName()

static std::string CppInterOp::Tracing::ReproBuffer::parseEnumName ( const char *  sig)
inlinestatic

Definition at line 410 of file Tracing.h.

Referenced by append().

Member Data Documentation

◆ Buffer

llvm::SmallString<128> CppInterOp::Tracing::ReproBuffer::Buffer

Definition at line 308 of file Tracing.h.

Referenced by CppInterOp::Tracing::TraceRegion::TraceRegion().

◆ OS

llvm::raw_svector_ostream CppInterOp::Tracing::ReproBuffer::OS

The documentation for this struct was generated from the following file: