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);
|
||||
operand_t *label_operand (const struct expr_s *label);
|
||||
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);
|
||||
|
||||
sblock_t *new_sblock (void);
|
||||
|
|
|
@ -316,7 +316,9 @@ copy_operand (operand_t *src)
|
|||
void
|
||||
free_operand (operand_t *op)
|
||||
{
|
||||
FREE (operands, op);
|
||||
if (op) {
|
||||
FREE (operands, op);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -571,7 +573,7 @@ short_operand (short short_val, const expr_t *expr)
|
|||
return value_operand (val, expr);
|
||||
}
|
||||
|
||||
static const char *
|
||||
const char *
|
||||
convert_op (int op)
|
||||
{
|
||||
switch (op) {
|
||||
|
|
Loading…
Reference in a new issue