P4C
The P4 Compiler
|
#include <utils_v2.h>
Public Member Functions | |
AllocResult (const AllocError *err) | |
AllocResult (const Transaction &tx) | |
std::string | err_str () const |
bool | ok () const |
bool | operator== (const AllocResult &other) const |
std::string | tx_str (cstring prefix=""_cs) const |
Static Public Member Functions | |
static std::string | pretty_print_tx (const PHV::Transaction &tx, cstring prefix=cstring::empty) |
Public Attributes | |
const AllocError * | err = nullptr |
std::optional< PHV::Transaction > | tx |
AllocResult is the most common return type of an allocation function. It is either an error or a PHV::Transaction if succeeded.