C++ tools can also devirtualize when doing whole-program optimization or tools like BOLT can promote indirect calls generated by any language.