This commit introduces TypeNameTraits as a customization point for
llvm::getTypeName<T>().
Before this commit, developers can specialize llvm::getTypeName<T>()
function template to customize the behavior. However, C++ programming
language doesn't allow function template partial specialization.
After this commit, if someone wants to partial specialize
getTypeName() for a class template, they can define:
namespace llvm { template <typename T> class TypeNameTraits<SomeContainer<T>> { public: static llvm::StringRef getTypeName() { // ... a different implementation ... } }; } // namespace llvm
And then, calling llvm::getTypeName<SomeContainer<int>>() will be
dispatched to the partial specialized version.