OpenBSD/arm types

Like NetBSD, OpenBSD prefers having a consistent set of typedefs
across the architectures it supports over strictly following the ARM
ABIs. The diff below makes sure that clang's view of those types
matches OpenBSD's system header files.

Index: lib/Basic/Targets.cpp

Hi Mark,

This patch looks ok, can you also provide the relevant tests, please?
You should find enough material by looking for NetBSD tests on that
area.

cheers,
--renato

And patches go to the commits list too. :slight_smile:

From: Renato Golin <renato.golin@linaro.org>
Date: Sun, 18 Sep 2016 14:17:04 +0100

Hi Mark,

This patch looks ok, can you also provide the relevant tests, please?
You should find enough material by looking for NetBSD tests on that
area.

Thanks,

Here is a diff that changes the Preprocessor/init.c test to test for
the types which should be the same on all architectures supported by
OpenBSD. I did add a check for the __ELF__ and __OpenBSD__ defines
which should be present as well. I think doing it this way makes a
bit more sense than checking a few random platforms, which is what the
NetBSD tests currently do. We can easily add other platforms (mips64,
powerpc) if/when those get fixed (didn't check powerpc, but on mips64
the test would currently fail).

Thanks again,

Mark

Index: lib/Basic/Targets.cpp

Makes sense, thanks!

Can you send it to cfe-commits@, so that we can process in the usual
manner, and other people can review?

Some of us have special filters on commits@ that we don't on dev@.

cheers,
--renato

It's not a random platform list, it is exhaustive as far as the
supported platforms go. MIPS(64) is missing from the list as it is not
yet fully/properly tested as far as NetBSD goes.

Joerg

Date: Mon, 19 Sep 2016 22:16:56 +0200
From: Joerg Sonnenberger via cfe-dev <cfe-dev@lists.llvm.org>

> Here is a diff that changes the Preprocessor/init.c test to test for
> the types which should be the same on all architectures supported by
> OpenBSD. I did add a check for the __ELF__ and __OpenBSD__ defines
> which should be present as well. I think doing it this way makes a
> bit more sense than checking a few random platforms, which is what the
> NetBSD tests currently do.

It's not a random platform list, it is exhaustive as far as the
supported platforms go. MIPS(64) is missing from the list as it is not
yet fully/properly tested as far as NetBSD goes.

That came out a little bit stronger than intended. All I wanted to
say is that even though NetBSD seems to aim for the same type
consistency across platforms as OpenBSD, there are separate tests for
each platform. Which appeared sub-optimal in the context of my diff
for OpenBSD.