enum Addressing_Mode : u8;

This commit is contained in:
gingerBill
2021-07-12 16:45:54 +01:00
parent 76707e1d2f
commit 3930a32b0c
2 changed files with 4 additions and 3 deletions

View File

@@ -9,15 +9,15 @@ struct Checker;
struct CheckerInfo;
struct CheckerContext;
enum AddressingMode;
enum AddressingMode : u8;
struct TypeAndValue;
// ExprInfo stores information used for "untyped" expressions
struct ExprInfo {
AddressingMode mode;
bool is_lhs; // Debug info
Type * type;
ExactValue value;
bool is_lhs; // Debug info
};
gb_inline ExprInfo *make_expr_info(AddressingMode mode, Type *type, ExactValue const &value, bool is_lhs) {

View File

@@ -6,7 +6,7 @@ struct DeclInfo;
struct AstFile;
struct AstPackage;
enum AddressingMode {
enum AddressingMode : u8 {
Addressing_Invalid = 0, // invalid addressing mode
Addressing_NoValue = 1, // no value (void in C)
Addressing_Value = 2, // computed value (rvalue)
@@ -29,6 +29,7 @@ enum AddressingMode {
struct TypeAndValue {
AddressingMode mode;
bool is_lhs; // Debug info
Type * type;
ExactValue value;
};