Author: Jun Zhang Date: 2022-04-26T16:45:01+08:00 New Revision: 218dcdad8a0c0f3340a97dafa24456125fe9b4fb
URL: https://github.com/llvm/llvm-project/commit/218dcdad8a0c0f3340a97dafa24456125fe9b4fb DIFF: https://github.com/llvm/llvm-project/commit/218dcdad8a0c0f3340a97dafa24456125fe9b4fb.diff LOG: [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 Added: Modified: clang/lib/Serialization/GlobalModuleIndex.cpp Removed: ################################################################################ diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp index 52ce17d984bf4..b2283c2b39877 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()); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits