Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fbf2323 authored by Bernhard Rosenkraenzer's avatar Bernhard Rosenkraenzer
Browse files

Allow building on clang without __builtin_assume_aligned



Clang versions up to and including 3.5 don't have
__builtin_assume_aligned.
Define it to a reasonable approximation when building with those.

Change-Id: I223ccfda6e6ae55ce29dda5e4cacc1b162728b2c
Signed-off-by: default avatarBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
parent f129e84a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -30,7 +30,10 @@

#include "AudioResamplerSinc.h"


#if defined(__clang__) && !__has_builtin(__builtin_assume_aligned)
#define __builtin_assume_aligned(p, a) \
	(((uintptr_t(p) % (a)) == 0) ? (p) : (__builtin_unreachable(), (p)))
#endif

#if defined(__arm__) && !defined(__thumb__)
#define USE_INLINE_ASSEMBLY (true)