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.