summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/SpecialCaseList.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-05-27 12:30:51 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-05-27 12:30:51 +0000
commit4fed928f53dbea24914bc0db307e0988c6e44c8c (patch)
treed6c73577b5531048e54fb19c78b8e316b7fc66ad /llvm/lib/Support/SpecialCaseList.cpp
parentc91e38c5ebf6f0cfbb29eff66c5ff6db43c3ee45 (diff)
downloadbcm5719-llvm-4fed928f53dbea24914bc0db307e0988c6e44c8c.tar.gz
bcm5719-llvm-4fed928f53dbea24914bc0db307e0988c6e44c8c.zip
Avoid some copies by using const references.
clang-tidy's performance-unnecessary-copy-initialization with some manual fixes. No functional changes intended. llvm-svn: 270988
Diffstat (limited to 'llvm/lib/Support/SpecialCaseList.cpp')
-rw-r--r--llvm/lib/Support/SpecialCaseList.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/SpecialCaseList.cpp b/llvm/lib/Support/SpecialCaseList.cpp
index ea417c41c0a..0ffe4444a17 100644
--- a/llvm/lib/Support/SpecialCaseList.cpp
+++ b/llvm/lib/Support/SpecialCaseList.cpp
@@ -50,7 +50,7 @@ std::unique_ptr<SpecialCaseList>
SpecialCaseList::create(const std::vector<std::string> &Paths,
std::string &Error) {
std::unique_ptr<SpecialCaseList> SCL(new SpecialCaseList());
- for (auto Path : Paths) {
+ for (const auto &Path : Paths) {
ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
MemoryBuffer::getFile(Path);
if (std::error_code EC = FileOrErr.getError()) {
OpenPOWER on IntegriCloud