]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/objc: make objc_demangle a member function of objc_language
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 15 Mar 2021 17:50:28 +0000 (17:50 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 22 Mar 2021 10:07:37 +0000 (10:07 +0000)
commit46fec6428ef7504be486ebd57e2509bde4382918
tree1b5854ccb1d9b0b1ec03a0ad8c844d233b1e8e58
parent08dedd6631efefbcba63c4dbf60ef97fb615e022
gdb/objc: make objc_demangle a member function of objc_language

Makes the objc_demangle helper function a member function of
objc_language (by renaming it to be the demangle_symbol member
function).

I also fixed some of the obvious coding standard violations in
obj_demangle, so the '&&' operators are now at the start of the line,
not the end.  Comparison to nullptr are now made explicit, as are
comparisons to the null character.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* objc-lang.c (objc_demangle): Renamed to
objc_language::demangle_symbol, and moved later in the file.
(objc_language::sniff_from_mangled_name): Call demangle_symbol
member function.
(objc_language::demangle_symbol): Defined outside of class
declaration.  The definition is the old objc_demangle with NULL
changed to nullptr, and if conditions relating to nullptr pointers
or null character checks made explicit.
* objc-lang.h (objc_demangle): Delete declaration.
gdb/ChangeLog
gdb/objc-lang.c
gdb/objc-lang.h