diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2017-01-13 14:39:03 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2017-01-13 14:39:03 +0000 |
| commit | 061f4a5fe6c60116831fa18e7db7faa24c7bd1e2 (patch) | |
| tree | 230b3008532884534ba5398c518949a2e906a27b /llvm/lib/LTO/Caching.cpp | |
| parent | 2178370e534d12d24ed505610b7569e12de5e3ad (diff) | |
| download | bcm5719-llvm-061f4a5fe6c60116831fa18e7db7faa24c7bd1e2.tar.gz bcm5719-llvm-061f4a5fe6c60116831fa18e7db7faa24c7bd1e2.zip | |
Apply clang-tidy's performance-unnecessary-value-param to LLVM.
With some minor manual fixes for using function_ref instead of
std::function. No functional change intended.
llvm-svn: 291904
Diffstat (limited to 'llvm/lib/LTO/Caching.cpp')
| -rw-r--r-- | llvm/lib/LTO/Caching.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/LTO/Caching.cpp b/llvm/lib/LTO/Caching.cpp index fd5bdb0bc01..f635369df8d 100644 --- a/llvm/lib/LTO/Caching.cpp +++ b/llvm/lib/LTO/Caching.cpp @@ -46,7 +46,7 @@ static void commitEntry(StringRef TempFilename, StringRef EntryPath) { } } -NativeObjectCache lto::localCache(std::string CacheDirectoryPath, +NativeObjectCache lto::localCache(StringRef CacheDirectoryPath, AddFileFn AddFile) { return [=](unsigned Task, StringRef Key) -> AddStreamFn { // First, see if we have a cache hit. @@ -68,8 +68,9 @@ NativeObjectCache lto::localCache(std::string CacheDirectoryPath, CacheStream(std::unique_ptr<raw_pwrite_stream> OS, AddFileFn AddFile, std::string TempFilename, std::string EntryPath, unsigned Task) - : NativeObjectStream(std::move(OS)), AddFile(AddFile), - TempFilename(TempFilename), EntryPath(EntryPath), Task(Task) {} + : NativeObjectStream(std::move(OS)), AddFile(std::move(AddFile)), + TempFilename(std::move(TempFilename)), + EntryPath(std::move(EntryPath)), Task(Task) {} ~CacheStream() { // Make sure the file is closed before committing it. |

