llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
#include <core/item.h>
Public Types | |
enum | Kind : uint8_t { Kind::INT8, Kind::INT16, Kind::INT32, Kind::INT64, Kind::FLOAT64, Kind::EXPR32, Kind::EXPR64, Kind::SPACE, Kind::STRING } |
Enumeration of item kinds. More... | |
Public Member Functions | |
Item (Item &that) | |
Copy constructor. | |
~Item () | |
Cleanup. | |
void | removeFromParent () |
Removes an item from the parent. | |
void | eraseFromParent () |
Removes an atom from the data section. | |
Atom * | getParent () const |
Returns a pointer to the parent section. | |
Kind | GetKind () const |
Returns the item kind. | |
bool | IsExpr () const |
Checks whether the item is an expression. | |
bool | IsSpace () const |
Checks whether the item is space. | |
size_t | GetSize () const |
Returns the size of the item in bytes. | |
int8_t | GetInt8 () const |
int16_t | GetInt16 () const |
int32_t | GetInt32 () const |
int64_t | GetInt64 () const |
unsigned | GetSpace () const |
Returns the spacing. | |
double | GetFloat64 () const |
llvm::StringRef | getString () const |
Returns the string value. | |
std::string_view | GetString () const |
Returns the string value. | |
Expr * | GetExpr () |
Returns the symbol value. | |
const Expr * | GetExpr () const |
Returns the symbol value. | |
Expr * | AsExpr () |
Returns the item as an expression, nullptr if not one. | |
const Expr * | AsExpr () const |
Returns the item as an expression, nullptr if not one. | |
Static Public Member Functions | |
static Item * | CreateInt8 (int8_t val) |
static Item * | CreateInt16 (int16_t val) |
static Item * | CreateInt32 (int32_t val) |
static Item * | CreateInt64 (int64_t val) |
static Item * | CreateFloat64 (double val) |
static Item * | CreateSpace (unsigned val) |
static Item * | CreateExpr32 (Expr *val) |
static Item * | CreateExpr64 (Expr *val) |
static Item * | CreateString (const std::string_view str) |
Friends | |
struct | llvm::ilist_traits< Item > |
Class representing a value in the data section.
|
strong |