+2017-11-09 Tom Tromey <tom@tromey.com>
+
+ * dictionary.c (dict_hash): Move "TKB" check into the "switch".
+
2017-11-08 Joel Brobecker <brobecker@adacore.com>
* ada-exp.y (write_var_from_sym): Remove parameter
hash = 0;
while (*string)
{
- /* Ignore "TKB" suffixes.
-
- These are used by Ada for subprograms implementing a task body.
- For instance for a task T inside package Pck, the name of the
- subprogram implementing T's body is `pck__tTKB'. We need to
- ignore the "TKB" suffix because searches for this task body
- subprogram are going to be performed using `pck__t' (the encoded
- version of the natural name `pck.t'). */
- if (strcmp (string, "TKB") == 0)
- return hash;
-
switch (*string)
{
case '$':
return hash;
hash = 0;
string += 2;
- break;
+ continue;
}
- /* FALL THROUGH */
- default:
- hash = SYMBOL_HASH_NEXT (hash, *string);
- string += 1;
+ break;
+ case 'T':
+ /* Ignore "TKB" suffixes.
+
+ These are used by Ada for subprograms implementing a task body.
+ For instance for a task T inside package Pck, the name of the
+ subprogram implementing T's body is `pck__tTKB'. We need to
+ ignore the "TKB" suffix because searches for this task body
+ subprogram are going to be performed using `pck__t' (the encoded
+ version of the natural name `pck.t'). */
+ if (strcmp (string, "TKB") == 0)
+ return hash;
break;
}
+
+ hash = SYMBOL_HASH_NEXT (hash, *string);
+ string += 1;
}
return hash;
}