Initialize compiler builtins
Clang's builtin function list must be initialized in order to be
recognized. Otherwise they are defined implicitly when encountered.
Implicitly defined functions have a return type of 'int', which might
be incompatible with the expected return type.
This happens for instance when including the mmintrin.h header. The
builtin __builtin_ia32_vec_init_v2si is expected to return a vector
type. Because it is a system header, there is no warning for the
implicitly defined function. Instead, compilation fails with the error
message:
/usr/lib/llvm-3.6/bin/../lib/clang/3.6.0/include/mmintrin.h:46:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Michael Kruse <pet@meinersbur.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>