diff options
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/StringMap.cpp | 6 | ||||
-rw-r--r-- | lib/Support/StringRef.cpp | 6 | ||||
-rw-r--r-- | lib/Support/Triple.cpp | 16 |
3 files changed, 14 insertions, 14 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; diff --git a/lib/Support/StringRef.cpp b/lib/Support/StringRef.cpp index deaa19efe9..3f3ee5b3ea 100644 --- a/lib/Support/StringRef.cpp +++ b/lib/Support/StringRef.cpp @@ -24,7 +24,7 @@ const size_t StringRef::npos; /// /// \return - The index of the first occurence of \arg Str, or npos if not /// found. -size_t StringRef::find(const StringRef &Str) const { +size_t StringRef::find(StringRef Str) const { size_t N = Str.size(); if (N > Length) return npos; @@ -38,7 +38,7 @@ size_t StringRef::find(const StringRef &Str) const { /// /// \return - The index of the last occurence of \arg Str, or npos if not /// found. -size_t StringRef::rfind(const StringRef &Str) const { +size_t StringRef::rfind(StringRef Str) const { size_t N = Str.size(); if (N > Length) return npos; @@ -75,7 +75,7 @@ StringRef::size_type StringRef::find_first_not_of(StringRef Chars) const { /// count - Return the number of non-overlapped occurrences of \arg Str in /// the string. -size_t StringRef::count(const StringRef &Str) const { +size_t StringRef::count(StringRef Str) const { size_t Count = 0; size_t N = Str.size(); if (N > Length) diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index 26a1a4e582..73e6bd3828 100644 --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp @@ -102,7 +102,7 @@ const char *Triple::getOSTypeName(OSType Kind) { return "<invalid>"; } -Triple::ArchType Triple::getArchTypeForLLVMName(const StringRef &Name) { +Triple::ArchType Triple::getArchTypeForLLVMName(StringRef Name) { if (Name == "alpha") return alpha; if (Name == "arm") @@ -141,7 +141,7 @@ Triple::ArchType Triple::getArchTypeForLLVMName(const StringRef &Name) { return UnknownArch; } -Triple::ArchType Triple::getArchTypeForDarwinArchName(const StringRef &Str) { +Triple::ArchType Triple::getArchTypeForDarwinArchName(StringRef Str) { // See arch(3) and llvm-gcc's driver-driver.c. We don't implement support for // archs which Darwin doesn't use. @@ -393,7 +393,7 @@ void Triple::setOS(OSType Kind) { setOSName(getOSTypeName(Kind)); } -void Triple::setArchName(const StringRef &Str) { +void Triple::setArchName(StringRef Str) { // Work around a miscompilation bug for Twines in gcc 4.0.3. SmallString<64> Triple; Triple += Str; @@ -404,11 +404,11 @@ void Triple::setArchName(const StringRef &Str) { setTriple(Triple.str()); } -void Triple::setVendorName(const StringRef &Str) { +void Triple::setVendorName(StringRef Str) { setTriple(getArchName() + "-" + Str + "-" + getOSAndEnvironmentName()); } -void Triple::setOSName(const StringRef &Str) { +void Triple::setOSName(StringRef Str) { if (hasEnvironment()) setTriple(getArchName() + "-" + getVendorName() + "-" + Str + "-" + getEnvironmentName()); @@ -416,11 +416,11 @@ void Triple::setOSName(const StringRef &Str) { setTriple(getArchName() + "-" + getVendorName() + "-" + Str); } -void Triple::setEnvironmentName(const StringRef &Str) { - setTriple(getArchName() + "-" + getVendorName() + "-" + getOSName() + +void Triple::setEnvironmentName(StringRef Str) { + setTriple(getArchName() + "-" + getVendorName() + "-" + getOSName() + "-" + Str); } -void Triple::setOSAndEnvironmentName(const StringRef &Str) { +void Triple::setOSAndEnvironmentName(StringRef Str) { setTriple(getArchName() + "-" + getVendorName() + "-" + Str); } |