]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove LS_TOKEN_KEYWORD macro
authorTom Tromey <tromey@adacore.com>
Thu, 6 Jun 2024 14:02:18 +0000 (08:02 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 12 Jun 2024 18:35:38 +0000 (12:35 -0600)
This removes the LS_TOKEN_KEYWORD macro from linespec.c.

Reviewed-by: Keith Seitz <keiths@redhat.com>
gdb/linespec.c

index b85d57c13c255898f6e0a7bdb816dc4d20f5da11..3db00300a58d797668e9256a37ad4849d08bfb8d 100644 (file)
@@ -276,7 +276,6 @@ struct linespec_token
 };
 
 #define LS_TOKEN_STOKEN(TOK) (TOK).data.string
-#define LS_TOKEN_KEYWORD(TOK) (TOK).data.keyword
 
 /* An instance of the linespec parser.  */
 
@@ -572,7 +571,7 @@ copy_token_string (linespec_token token)
   const char *str, *s;
 
   if (token.type == LSTOKEN_KEYWORD)
-    return make_unique_xstrdup (LS_TOKEN_KEYWORD (token));
+    return make_unique_xstrdup (token.data.keyword);
 
   str = LS_TOKEN_STOKEN (token).ptr;
   s = remove_trailing_whitespace (str, str + LS_TOKEN_STOKEN (token).length);
@@ -905,7 +904,7 @@ linespec_lexer_lex_one (linespec_parser *parser)
       if (keyword != NULL)
        {
          parser->lexer.current.type = LSTOKEN_KEYWORD;
-         LS_TOKEN_KEYWORD (parser->lexer.current) = keyword;
+         parser->lexer.current.data.keyword = keyword;
          /* We do not advance the stream here intentionally:
             we would like lexing to stop when a keyword is seen.