diff --git a/clang/lib/Serialization/MultiOnDiskHashTable.h b/clang/lib/Serialization/MultiOnDiskHashTable.h index a0d75ec3a9e76..6464220f13aef 100644 --- a/clang/lib/Serialization/MultiOnDiskHashTable.h +++ b/clang/lib/Serialization/MultiOnDiskHashTable.h @@ -93,7 +93,7 @@ template class MultiOnDiskHashTable { using result_type = OnDiskTable *; result_type operator()(void *P) const { - return Table::getFromOpaqueValue(P).template get(); + return llvm::cast(Table::getFromOpaqueValue(P)); } }; @@ -130,7 +130,7 @@ template class MultiOnDiskHashTable { Files.insert(PendingOverrides.begin(), PendingOverrides.end()); // Explicitly capture Files to work around an MSVC 2015 rejects-valid bug. auto ShouldRemove = [&Files](void *T) -> bool { - auto *ODT = Table::getFromOpaqueValue(T).template get(); + auto *ODT = llvm::cast(Table::getFromOpaqueValue(T)); bool Remove = Files.count(ODT->File); if (Remove) delete ODT;