[lldb] fix build issue on MSVC because of missing byte-swap builtins
authorAshay Rane <ashay@users.noreply.github.com>
Mon, 17 Apr 2023 16:17:43 +0000 (11:17 -0500)
committerAshay Rane <ashay@users.noreply.github.com>
Mon, 17 Apr 2023 19:39:00 +0000 (14:39 -0500)
commit7978abd5aef1ba84d7a1cefbc3443245acff2c48
tree80428d624b1ef2e74605b77c89b5cf1775a30f9c
parent3d8ed8b5192a59104bfbd5bf7ac84d035ee0a4a5
[lldb] fix build issue on MSVC because of missing byte-swap builtins

The `__builtin_bswap{32,64}()` builtins (introduced in commit e07a421d)
are missing from MSVC, which causes build errors when compiling LLDB on
Windows (tested with MSVC 19.34.31943.0).  This patch replaces the
builtins with either MSVC's `_byteswap_u{long,64}()` or the original
builtins, or the `bswap_{32,64}()` functions from byteswap.h, depending
on which ones are available.

Reviewed By: bulbazord

Differential Revision: https://reviews.llvm.org/D148541
lldb/source/Core/DumpRegisterValue.cpp