Skip to content

Commit 08505f2

Browse files
Pavel Chupind0k
andauthored
Undo a bit of fcf4e36 that confuses MSVC (#7664)
clang\lib\Serialization\GlobalModuleIndex.cpp(818): error C2440: 'initializing': cannot convert from 'const ValueTy' to '_Ty2 &&' with [ ValueTy=llvm::SmallVector<unsigned int,2> ] and [ _Ty2=llvm::SmallVector<unsigned int,2> ] Co-authored-by: Benjamin Kramer <benny.kra@googlemail.com>
1 parent 5a04090 commit 08505f2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang/lib/Serialization/GlobalModuleIndex.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,10 @@ bool GlobalModuleIndexBuilder::writeIndex(llvm::BitstreamWriter &Stream) {
815815
IdentifierIndexWriterTrait Trait;
816816

817817
// Populate the hash table.
818-
for (auto &[Identifier, IDs] : InterestingIdentifiers) {
819-
Generator.insert(Identifier, IDs, Trait);
818+
for (InterestingIdentifierMap::iterator I = InterestingIdentifiers.begin(),
819+
IEnd = InterestingIdentifiers.end();
820+
I != IEnd; ++I) {
821+
Generator.insert(I->first(), I->second, Trait);
820822
}
821823

822824
// Create the on-disk hash table in a buffer.

0 commit comments

Comments
 (0)