diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-06 10:58:06 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-06 10:58:06 +0000 |
commit | 2928c83b010f7cfdb0f819199d806f6942a7d995 (patch) | |
tree | 0c5a62b287e4c2c693330584a8f1d6024defde66 /lib/Support/StringMap.cpp | |
parent | c128b3e74eaba34a8f6d2b8c3dc19861b9cbd901 (diff) |
Pass StringRef by value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/StringMap.cpp')
-rw-r--r-- | lib/Support/StringMap.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Support/StringMap.cpp b/lib/Support/StringMap.cpp index a729d3d6c0..6f28277890 100644 --- a/lib/Support/StringMap.cpp +++ b/lib/Support/StringMap.cpp @@ -52,7 +52,7 @@ void StringMapImpl::init(unsigned InitSize) { /// specified bucket will be non-null. Otherwise, it will be null. In either /// case, the FullHashValue field of the bucket will be set to the hash value /// of the string. -unsigned StringMapImpl::LookupBucketFor(const StringRef &Name) { +unsigned StringMapImpl::LookupBucketFor(StringRef Name) { unsigned HTSize = NumBuckets; if (HTSize == 0) { // Hash table unallocated so far? init(16); @@ -110,7 +110,7 @@ unsigned StringMapImpl::LookupBucketFor(const StringRef &Name) { /// FindKey - Look up the bucket that contains the specified key. If it exists /// in the map, return the bucket number of the key. Otherwise return -1. /// This does not modify the map. -int StringMapImpl::FindKey(const StringRef &Key) const { +int StringMapImpl::FindKey(StringRef Key) const { unsigned HTSize = NumBuckets; if (HTSize == 0) return -1; // Really empty table? unsigned FullHashValue = HashString(Key); @@ -161,7 +161,7 @@ void StringMapImpl::RemoveKey(StringMapEntryBase *V) { /// RemoveKey - Remove the StringMapEntry for the specified key from the /// table, returning it. If the key is not in the table, this returns null. -StringMapEntryBase *StringMapImpl::RemoveKey(const StringRef &Key) { +StringMapEntryBase *StringMapImpl::RemoveKey(StringRef Key) { int Bucket = FindKey(Key); if (Bucket == -1) return 0; |