This also refactors some common code into the 'GetTypeName' method. llvm-svn: 289803
This will be used for an on-chip test suite. llvm-svn: 289641