[all-commits] [llvm/llvm-project] 7aaff8: [ADT] Move allocate_buffer to MemAlloc.h and out o...

Benjamin Kramer via All-commits all-commits at lists.llvm.org
Fri Apr 24 04:34:10 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7aaff8fd2da2812a2b3cbc8a41af29774b10a7d6
      https://github.com/llvm/llvm-project/commit/7aaff8fd2da2812a2b3cbc8a41af29774b10a7d6
  Author: Benjamin Kramer <benny.kra at googlemail.com>
  Date:   2020-04-24 (Fri, 24 Apr 2020)

  Changed paths:
    M llvm/include/llvm/ADT/DenseMap.h
    M llvm/include/llvm/ADT/FunctionExtras.h
    M llvm/include/llvm/Support/Compiler.h
    M llvm/include/llvm/Support/MemAlloc.h
    M llvm/lib/Support/CMakeLists.txt
    A llvm/lib/Support/MemAlloc.cpp

  Log Message:
  -----------
  [ADT] Move allocate_buffer to MemAlloc.h and out of line

There's an ABI breakage here if LLVM is compiled in C++14 without
aligned allocation and a user tries to use the result with aligned
allocation. If DenseMap or unique_function is used across that ABI
boundary it will break (PR45413). Moving it out of line is a bit of
a band-aid and LLVM doesn't really give ABI guarantees at this level,
but given the number of complaints I've received over this it still
seems worth fixing.




More information about the All-commits mailing list