diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-08-30 16:48:02 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-08-30 16:48:02 +0000 |
commit | 6dc4a8bc2c307022e0c330d531109d325fc044cf (patch) | |
tree | d10033092d22061f48f763822a09018fce5de6eb /llvm/lib/Support/SpecialCaseList.cpp | |
parent | e98cdf9b773f7bce3531345cfda1fa1eedf2fca7 (diff) | |
download | bcm5719-llvm-6dc4a8bc2c307022e0c330d531109d325fc044cf.tar.gz bcm5719-llvm-6dc4a8bc2c307022e0c330d531109d325fc044cf.zip |
Fix some cases where StringRef was being passed by const reference. Remove const from some other StringRefs since its implicitly const already.
llvm-svn: 216820
Diffstat (limited to 'llvm/lib/Support/SpecialCaseList.cpp')
-rw-r--r-- | llvm/lib/Support/SpecialCaseList.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Support/SpecialCaseList.cpp b/llvm/lib/Support/SpecialCaseList.cpp index 21e43c5e703..b4eeebdd192 100644 --- a/llvm/lib/Support/SpecialCaseList.cpp +++ b/llvm/lib/Support/SpecialCaseList.cpp @@ -48,8 +48,7 @@ struct SpecialCaseList::Entry { SpecialCaseList::SpecialCaseList() : Entries() {} -SpecialCaseList *SpecialCaseList::create( - const StringRef Path, std::string &Error) { +SpecialCaseList *SpecialCaseList::create(StringRef Path, std::string &Error) { if (Path.empty()) return new SpecialCaseList(); ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr = @@ -69,7 +68,7 @@ SpecialCaseList *SpecialCaseList::create( return SCL.release(); } -SpecialCaseList *SpecialCaseList::createOrDie(const StringRef Path) { +SpecialCaseList *SpecialCaseList::createOrDie(StringRef Path) { std::string Error; if (SpecialCaseList *SCL = create(Path, Error)) return SCL; @@ -157,8 +156,8 @@ bool SpecialCaseList::parse(const MemoryBuffer *MB, std::string &Error) { SpecialCaseList::~SpecialCaseList() {} -bool SpecialCaseList::inSection(const StringRef Section, const StringRef Query, - const StringRef Category) const { +bool SpecialCaseList::inSection(StringRef Section, StringRef Query, + StringRef Category) const { StringMap<StringMap<Entry> >::const_iterator I = Entries.find(Section); if (I == Entries.end()) return false; StringMap<Entry>::const_iterator II = I->second.find(Category); |