[all-commits] [llvm/llvm-project] 4a84b0: ADT: Sink the guts of StringMapEntry::Create into ...

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Thu Apr 8 17:59:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a84b03eced28cf08636e45700d3c8594378f329
      https://github.com/llvm/llvm-project/commit/4a84b03eced28cf08636e45700d3c8594378f329
  Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
  Date:   2021-04-08 (Thu, 08 Apr 2021)

  Changed paths:
    M llvm/include/llvm/ADT/StringMapEntry.h

  Log Message:
  -----------
  ADT: Sink the guts of StringMapEntry::Create into StringMapEntryBase

Sink the interesting parts of StringMapEntry::Create into a new function
StringMapEntryBase::allocateWithKey that's only templated on the
allocator, taking the entry size and alignment as parameters.

As dblaikie pointed out in the review, it'd be interesting as a
follow-up to make this more generic and maybe sink at least some of it
into a source file; I haven't done that yet myself, but I left behind an
encouraging comment.

Differential Revision: https://reviews.llvm.org/D95654




More information about the All-commits mailing list