Properly check return value from __cxa_demangle
Properly check return value from __cxa_demangle

FreeBSD uses libcxxrt (via libc++) instead of GNU libiberty (via
libstdc++) for __cxa_demangle(). When *output_buffer* and *length*
both are NULL it doesn't modify *status* on success. Rather than rely
on maybe uninitialized variable check the function doesn't return NULL.

Fixes: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213732
Signed-off-by: Jan Beich <93439dd42ccb629b9c9ae9f8c3f0643f544d9574@freebsd.org>
Reviewed-by: Pan Xiuli <e5a665b1e626c5dc0826076a8b5a209eb48bf6ee@intel.com>

wdv4758h/beignet,wdv4758h/beignet,wdv4758h/beignet,wdv4758h/beignet,wdv4758h/beignet