mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[qfcc] Expose convert_op and ensafen free_operand
Needed for type evaluation codegen, and free_operand needs to be null-safe.
This commit is contained in:
parent
9c902501d7
commit
55d7d1f069
2 changed files with 5 additions and 2 deletions
|
@ -162,6 +162,7 @@ operand_t *alias_operand (const struct type_s *type, operand_t *op,
|
||||||
const struct expr_s *expr);
|
const struct expr_s *expr);
|
||||||
operand_t *label_operand (const struct expr_s *label);
|
operand_t *label_operand (const struct expr_s *label);
|
||||||
operand_t *short_operand (short short_val, const struct expr_s *expr);
|
operand_t *short_operand (short short_val, const struct expr_s *expr);
|
||||||
|
const char *convert_op (int op) __attribute__((const));
|
||||||
void free_operand (operand_t *op);
|
void free_operand (operand_t *op);
|
||||||
|
|
||||||
sblock_t *new_sblock (void);
|
sblock_t *new_sblock (void);
|
||||||
|
|
|
@ -316,7 +316,9 @@ copy_operand (operand_t *src)
|
||||||
void
|
void
|
||||||
free_operand (operand_t *op)
|
free_operand (operand_t *op)
|
||||||
{
|
{
|
||||||
|
if (op) {
|
||||||
FREE (operands, op);
|
FREE (operands, op);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -571,7 +573,7 @@ short_operand (short short_val, const expr_t *expr)
|
||||||
return value_operand (val, expr);
|
return value_operand (val, expr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
const char *
|
||||||
convert_op (int op)
|
convert_op (int op)
|
||||||
{
|
{
|
||||||
switch (op) {
|
switch (op) {
|
||||||
|
|
Loading…
Reference in a new issue