[clang] Introduce paged vector (PR #66430)

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 18 11:32:16 PDT 2023


================
@@ -7944,9 +7944,13 @@ void ASTReader::PrintStats() {
   std::fprintf(stderr, "*** AST File Statistics:\n");
 
   unsigned NumTypesLoaded =
-      TypesLoaded.size() - llvm::count(TypesLoaded, QualType());
+      TypesLoaded.size() - std::count(TypesLoaded.materialisedBegin(),
----------------
dwblaikie wrote:

This seems confusing - I'd have thought any materialised type was a loaded type? So `NumTypesLoaded = std::count(TypesLoaded.materialisedBegin(), TypesLoaded.materialisedEnd())`?

(similarly for `DeclsLoaded` below)

Like wouldn't this result in `NumTypesLoaded` too high - for unmaterialized values they're all assumed to be loaded? Which sounds backwards.

https://github.com/llvm/llvm-project/pull/66430


More information about the cfe-commits mailing list