[PATCH] XCore target add __LITTLE_ENDIAN__ defined macro
Richard Osborne
richard at xmos.com
Thu Feb 13 02:43:57 PST 2014
Hi Robert,
It's hard to review this change without knowing a bit more context. In
particular:
* Is there some software in particular that relies on this macro?
* Is this macro a standard macro? Do other targets define this macro?
On 13/02/14 09:30, robert lytton wrote:
> Hi rafael, friedgold,
>
> http://llvm-reviews.chandlerc.com/D2760
>
> Files:
> lib/Basic/Targets.cpp
> test/Preprocessor/init.c
>
> Index: lib/Basic/Targets.cpp
> ===================================================================
> --- lib/Basic/Targets.cpp
> +++ lib/Basic/Targets.cpp
> @@ -5518,6 +5518,7 @@
> }
> virtual void getTargetDefines(const LangOptions &Opts,
> MacroBuilder &Builder) const {
> + Builder.defineMacro("__LITTLE_ENDIAN__");
> Builder.defineMacro("__XS1B__");
> }
> virtual void getTargetBuiltins(const Builtin::Info *&Records,
> Index: test/Preprocessor/init.c
> ===================================================================
> --- test/Preprocessor/init.c
> +++ test/Preprocessor/init.c
> @@ -3441,4 +3441,5 @@
> // PPC64-FREEBSD-NOT: #define __LONG_DOUBLE_128__ 1
> //
> // RUN: %clang_cc1 -E -dM -ffreestanding -triple=xcore-none-none < /dev/null | FileCheck -check-prefix XCORE %s
> +// XCORE:#define __LITTLE_ENDIAN__ 1
> // XCORE:#define __XS1B__ 1
--
Richard Osborne | XMOS
http://www.xmos.com
More information about the llvm-commits
mailing list