[lldb-dev] Pre-processor definition confusion

Ed Maste emaste at freebsd.org
Fri Sep 12 10:47:31 PDT 2014

On 12 September 2014 13:26, Zachary Turner <zturner at google.com> wrote:
> Is there any value in having an LLDB_HOST_XXX set of macros such as the
> following:
> The last one would translate to __FreeBSD__ || __FreeBSD_kernel__ ||
> __OpenBSD__ || __NetBSD__

Except that __FreeBSD_kernel__ wouldn't be included; I'd be surprised
to find LLDB_HOST_BSD true on Debian kFreeBSD.  It's distinct enough
that it would need it's own.

We'll also still need to test for more than one of these in some cases
though -- for example, for socket behaviour that is shared between OS
X and the BSDs.

I think cleaning up these macro tests is a laudable goal, but it's
inherently not possible to cleanly cover all cases.

More information about the lldb-dev mailing list