[all-commits] [llvm/llvm-project] dd8ecd: [ADT] llvm::bit_cast - use __builtin_bit_cast if a...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Jan 22 10:21:32 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dd8ecde00b3b3d8d0f80d7df43393f583d782413
      https://github.com/llvm/llvm-project/commit/dd8ecde00b3b3d8d0f80d7df43393f583d782413
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2023-01-22 (Sun, 22 Jan 2023)

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

  Log Message:
  -----------
  [ADT] llvm::bit_cast - use __builtin_bit_cast if available

If the compiler supports __builtin_bit_cast we should try to use it instead of std::memcpy (and avoid including the cstring header).

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




More information about the All-commits mailing list