diff options
author | Jun Zhang <jun@junz.org> | 2022-04-09 10:42:25 +0800 |
---|---|---|
committer | Jun Zhang <jun@junz.org> | 2022-04-26 16:45:01 +0800 |
commit | 218dcdad8a0c0f3340a97dafa24456125fe9b4fb (patch) | |
tree | 8da8c9e896e5cc7f344076017fc66465b73ef303 /clang/lib/Serialization/GlobalModuleIndex.cpp | |
parent | c430f0f532de3802ca76ed9f7f2d889987eb2749 (diff) | |
download | llvm-218dcdad8a0c0f3340a97dafa24456125fe9b4fb.zip llvm-218dcdad8a0c0f3340a97dafa24456125fe9b4fb.tar.gz llvm-218dcdad8a0c0f3340a97dafa24456125fe9b4fb.tar.bz2 |
[Clang] Use std::move in GlobalModuleIndex::readIndex. NFC
BitstreamCursors are heavy-weight objects that should not be passed by value.
Differential Revision: https://reviews.llvm.org/D123436
Diffstat (limited to 'clang/lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r-- | clang/lib/Serialization/GlobalModuleIndex.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp index 52ce17d..b2283c2 100644 --- a/clang/lib/Serialization/GlobalModuleIndex.cpp +++ b/clang/lib/Serialization/GlobalModuleIndex.cpp @@ -277,7 +277,7 @@ GlobalModuleIndex::readIndex(StringRef Path) { return std::make_pair(nullptr, Res.takeError()); } - return std::make_pair(new GlobalModuleIndex(std::move(Buffer), Cursor), + return std::make_pair(new GlobalModuleIndex(std::move(Buffer), std::move(Cursor)), llvm::Error::success()); } |