Part of http://reviews.llvm.org/D7827. The way we select symbolizer tools in sanitizer_symbolizer_posix_libcdep.cc's Symbolizer::PlatformInit currently uses only one (or zero) of them. And since all the POSIX symbolizers now use the commmon interface, we don't need to special-case the three classes anymore.
To maintain the current behavior, I changed the Demangle method in SymbolizerTool interface to return nullptr by default, which means that POSIXSymbolizer will fallback to use DemangleCXXABI. And in SymbolizeData of POSIXSymbolizer, the addition of the module base address (info->start += module->base_address()) has been moved into the individual tools, because not all tool parse back a relative offset (libbacktrace already fills in the full address).
I would re-write this function using early returns:
and then have a single `new(symbolizer_allocator_) POSIXSymbolizer(ChooseSymbolizer());`