Use StringRef instead of `const char *`.

I don't think there's a need to use `const char *`. In most (probably all?)
cases, we need a length of a name later, so discarding a length will
lead to a wasted effort.

Differential Revision: https://reviews.llvm.org/D49046

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336612 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed