[PATCH] XCore target add __LITTLE_ENDIAN__ defined macro

robert lytton robert at xmos.com
Thu Feb 13 01:30:06 PST 2014


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2760.1.patch
Type: text/x-patch
Size: 870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140213/2c3e0ae2/attachment.bin>


More information about the llvm-commits mailing list