summaryrefslogtreecommitdiffstats
path: root/lib/Lex/HeaderMap.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-02-20 23:12:51 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-02-20 23:12:51 +0000
commit4e8d52ad038b2ca4b8a702495da54d594298fc34 (patch)
tree50afc246c575ad48f2677158d1705abb94ca6ab5 /lib/Lex/HeaderMap.cpp
parentc41b90a59cc79231b5ac5772309313a54343d94b (diff)
Lex: Change HeaderMapImpl::getString() to return StringRef, NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261459 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/HeaderMap.cpp')
-rw-r--r--lib/Lex/HeaderMap.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Lex/HeaderMap.cpp b/lib/Lex/HeaderMap.cpp
index 394a51dbb7..afa2631ac5 100644
--- a/lib/Lex/HeaderMap.cpp
+++ b/lib/Lex/HeaderMap.cpp
@@ -145,7 +145,7 @@ HMapBucket HeaderMapImpl::getBucket(unsigned BucketNo) const {
/// getString - Look up the specified string in the string table. If the string
/// index is not valid, it returns an empty string.
-const char *HeaderMapImpl::getString(unsigned StrTabIdx) const {
+StringRef HeaderMapImpl::getString(unsigned StrTabIdx) const {
// Add the start of the string table to the idx.
StrTabIdx += getEndianAdjustedWord(getHeader().StringsOffset);
@@ -175,9 +175,9 @@ LLVM_DUMP_METHOD void HeaderMapImpl::dump() const {
HMapBucket B = getBucket(i);
if (B.Key == HMAP_EmptyBucketKey) continue;
- const char *Key = getString(B.Key);
- const char *Prefix = getString(B.Prefix);
- const char *Suffix = getString(B.Suffix);
+ StringRef Key = getString(B.Key);
+ StringRef Prefix = getString(B.Prefix);
+ StringRef Suffix = getString(B.Suffix);
llvm::dbgs() << " " << i << ". " << Key << " -> '" << Prefix << "' '"
<< Suffix << "'\n";
}