]> git.proxmox.com Git - mirror_edk2.git/commit - MdePkg/Include/Base.h
MdePkg: Use __builtin_offset with CLANGPDB toolchain
authorAlex James <theracermaster@gmail.com>
Thu, 28 Nov 2019 05:56:45 +0000 (13:56 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 20 Dec 2019 05:54:06 +0000 (05:54 +0000)
commit796b380ca7d263ca504b82fe5317a78d3546d537
treef9764a2d9aebdd3edc774f82c6984a8470f2e597
parent665afccc52e1a02ee329147e02f04b8e9cf1d571
MdePkg: Use __builtin_offset with CLANGPDB toolchain

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2393

CLANGPDB does not define __GNUC__, but it does define __clang__. Check
for the __clang__ preprocessor definition to use __builtin_offsetof to
implement the OFFSET_OF macro.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Alex James <theracermaster@gmail.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/Base.h