Mark `absl::container_internal::DestroySlots` as `ABSL_ATTRIBUTE_NOINLINE`. For tree-like types that recursively contain a `flat_hash_map` or `flat_hash_set` of themselves, ThinLTO importing and inlining of `Destruct<false>` and `DestroySlots` can trigger an exponential ($2^k$) mutually recursive inlining blowup in Clang/LLVM during LTO backend compilation because `DestroySlots` contains two indirect calls to `destroy_slot` (`cap <= 8` and `cap >= 16`) that devirtualize back into the recursive destructor chain, while the two-hop type-erased call chain (`Destruct<false>` -> `DestroySlots`) causes LLVM's `InlineFunction` to drop `!inline_history` metadata. PiperOrigin-RevId: 1005644544
diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index caf8219..c4ab73e 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h
@@ -2237,8 +2237,8 @@ // Destroys all full slots in the backing array. // REQUIRES: !is_small(c.capacity()). // REQUIRES: destroy_slot != nullptr. -void DestroySlots(CommonFields& c, size_t slot_size, - DestroySlotFn destroy_slot); +ABSL_ATTRIBUTE_NOINLINE void DestroySlots(CommonFields& c, size_t slot_size, + DestroySlotFn destroy_slot); // Deallocates the backing array and unregister infoz if necessary. // REQUIRES: c.capacity > raw_hash_set::DefaultCapacity().