// - ?[A-Z]: The range from \xc1 to \xda.
// - ?[0-9]: The set of [,/\:. \n\t'-].
// - ?$XX: A fallback which maps nibbles.
- if ((Byte >= 'a' && Byte <= 'z') || (Byte >= 'A' && Byte <= 'Z') ||
- (Byte >= '0' && Byte <= '9') || Byte == '_' || Byte == '$') {
+ if (isIdentifierBody(Byte, /*AllowDollar=*/true)) {
Mangler.getStream() << Byte;
- } else if ((Byte >= '\xe1' && Byte <= '\xfa') ||
- (Byte >= '\xc1' && Byte <= '\xda')) {
- // The delta between '\xe1' and '\xc1' is the same as 'a' to 'A'.
- Mangler.getStream() << '?' << static_cast<char>('A' + (Byte - '\xc1'));
+ } else if (isLetter(Byte & 0x7f)) {
+ Mangler.getStream() << '?' << static_cast<char>(Byte & 0x7f);
} else {
switch (Byte) {
case ',':