mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-13 14:51:26 -07:00
Add constant literal expressions
This commit is contained in:
@@ -6978,6 +6978,13 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) {
|
||||
return ir_addr_load(proc, ir_build_addr(proc, expr));
|
||||
}
|
||||
|
||||
if (tv.mode == Addressing_Constant) {
|
||||
GB_ASSERT(tv.value.kind == ExactValue_Invalid);
|
||||
// NOTE(bill): Zero value constant
|
||||
return ir_add_module_constant(proc->module, tv.type, tv.value);
|
||||
}
|
||||
|
||||
|
||||
switch (expr->kind) {
|
||||
case_ast_node(bl, BasicLit, expr);
|
||||
TokenPos pos = bl->token.pos;
|
||||
|
||||
Reference in New Issue
Block a user