This renames split_style::DOT, to avoid name clashes when building gdb
with an old version of Bison (2.3, the version available on macOS).
In particular the error looks like:
./split-name.h:34:3: error: expected identifier
DOT,
^
m2-exp.c:163:13: note: expanded from macro 'DOT'
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30286
if (canonical.empty ())
return {};
std::vector<gdb::string_view> names = split_name (canonical.c_str (),
- split_style::DOT);
+ split_style::DOT_STYLE);
gdb::string_view tail = names.back ();
names.pop_back ();
}
break;
- case split_style::DOT:
+ case split_style::DOT_STYLE:
/* D and Go-style names. */
for (const char *iter = strchr (name, '.');
iter != nullptr;
NONE,
/* C++ style, with "::" and template parameter intelligence. */
CXX,
- /* Split at ".". Used by Ada, Go, D. */
- DOT,
+ /* Split at ".". Used by Ada, Go, D. This has a funny name to work
+ around a bug in Bison 2.3, which is used on macOS. */
+ DOT_STYLE,
/* Split at "__". Used by Ada encoded names. */
UNDERSCORE,
};
break;
case language_d:
case language_go:
- style = split_style::DOT;
+ style = split_style::DOT_STYLE;
break;
}
return ::split_name (language_lookup_name (lang), style);