[all-commits] [llvm/llvm-project] 8b6d1c: [ADT] Use alignas + sizeof for inline storage, NFC

Reid Kleckner via All-commits all-commits at lists.llvm.org
Wed Oct 14 16:16:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8b6d1c0467b2dfa14cb2d2dec7637bf95c78364b
      https://github.com/llvm/llvm-project/commit/8b6d1c0467b2dfa14cb2d2dec7637bf95c78364b
  Author: Reid Kleckner <rnk at google.com>
  Date:   2020-10-14 (Wed, 14 Oct 2020)

  Changed paths:
    M clang/include/clang/AST/APValue.h
    M llvm/include/llvm/ADT/SmallVector.h
    M llvm/include/llvm/ADT/iterator_range.h

  Log Message:
  -----------
  [ADT] Use alignas + sizeof for inline storage, NFC

AlignedCharArrayUnion is really only needed to handle the "union" case
when we need memory of suitable size and alignment for multiple types.
SmallVector only needs storage for one type, so use that directly.




More information about the All-commits mailing list