diff options
author | 2009-04-30 21:08:53 +0000 | |
---|---|---|
committer | 2009-08-11 20:36:39 +0000 | |
commit | c8e20ba6dfab0d84ceb57e8b942c6769f72b507a (patch) | |
tree | 8a6644aba197c36dbf086b39fd978368842d0b6f | |
parent | unssa: track uses when replacing a phi node (diff) | |
download | sparse-c8e20ba6dfab0d84ceb57e8b942c6769f72b507a.tar.gz sparse-c8e20ba6dfab0d84ceb57e8b942c6769f72b507a.tar.bz2 sparse-c8e20ba6dfab0d84ceb57e8b942c6769f72b507a.zip |
show_token: handle TOKEN_UNTAINT and TOKEN_ARG_COUNT types
These cases are probably never hit with "regular" codepaths, but are
useful when called in a gdb session to print token sequences.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r-- | tokenize.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -162,9 +162,18 @@ const char *show_token(const struct token *token) case TOKEN_STREAMEND: sprintf(buffer, "<end of '%s'>", stream_name(token->pos.stream)); return buffer; - + + case TOKEN_UNTAINT: + sprintf(buffer, "<untaint>"); + return buffer; + + case TOKEN_ARG_COUNT: + sprintf(buffer, "<argcnt>"); + return buffer; + default: - return "WTF???"; + sprintf(buffer, "unhandled token type '%d' ", token_type(token)); + return buffer; } } |