diff --git a/clang/include/clang/Serialization/GlobalModuleIndex.h b/clang/include/clang/Serialization/GlobalModuleIndex.h --- a/clang/include/clang/Serialization/GlobalModuleIndex.h +++ b/clang/include/clang/Serialization/GlobalModuleIndex.h @@ -113,7 +113,7 @@ /// Internal constructor. Use \c readIndex() to read an index. explicit GlobalModuleIndex(std::unique_ptr Buffer, - llvm::BitstreamCursor Cursor); + llvm::BitstreamCursor &Cursor); GlobalModuleIndex(const GlobalModuleIndex &) = delete; GlobalModuleIndex &operator=(const GlobalModuleIndex &) = delete; diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp --- a/clang/lib/Serialization/GlobalModuleIndex.cpp +++ b/clang/lib/Serialization/GlobalModuleIndex.cpp @@ -127,7 +127,7 @@ GlobalModuleIndex::GlobalModuleIndex( std::unique_ptr IndexBuffer, - llvm::BitstreamCursor Cursor) + llvm::BitstreamCursor &Cursor) : Buffer(std::move(IndexBuffer)), IdentifierIndex(), NumIdentifierLookups(), NumIdentifierLookupHits() { auto Fail = [&](llvm::Error &&Err) {