bulbazord requested changes to this revision.
bulbazord added a comment.
This revision now requires changes to proceed.

Instead of not using `__builtin_bswap{32,64}` entirely, we should check if 
they're available.

You can use the clang feature-checking macro `__has_builtin` (and if it doesn't 
exist you can define it). So you could amend this patch like so:

  #if !defined(__has_builtin)
  #define __has_builtin(x) 0
  #endif
  
  #if __has_builtin(__builtin_bswap32)
  #define bswap_32(x) __builtin_bswap32(x)
  #elif _MSC_VER
  #define bswap_32(x) _byteswap_ulong(x)
  #else
  #include <byteswap.h>
  #endif




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148541/new/

https://reviews.llvm.org/D148541

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to