mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
[qfcc] Add pointer value check
Extraction is a little more complicated, though, so undecided on that.
This commit is contained in:
parent
c3f04384d5
commit
9cb3ee01d6
2 changed files with 10 additions and 0 deletions
|
@ -618,6 +618,7 @@ int is_integer_val (expr_t *e) __attribute__((pure));
|
|||
int is_uinteger_val (expr_t *e) __attribute__((pure));
|
||||
int is_short_val (expr_t *e) __attribute__((pure));
|
||||
int is_integral_val (expr_t *e) __attribute__((pure));
|
||||
int is_pointer_val (expr_t *e) __attribute__((pure));
|
||||
|
||||
/** Create a reference to the global <code>.self</code> entity variable.
|
||||
|
||||
|
|
|
@ -1193,6 +1193,15 @@ expr_integral (expr_t *e)
|
|||
internal_error (e, "not an integral constant");
|
||||
}
|
||||
|
||||
int
|
||||
is_pointer_val (expr_t *e)
|
||||
{
|
||||
if (e->type == ex_value && e->e.value->lltype == ev_pointer) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
expr_t *
|
||||
new_alias_expr (type_t *type, expr_t *expr)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue