[PATCH] XCore target add __LITTLE_ENDIAN__ defined macro

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Sun Feb 16 06:35:26 PST 2014


  I just checked gcc, and it is fairly inconsistent as to when __LITTLE_ENDIAN__ is defined. In fact, it is not defined on x86_64 (but we already do).

  It still seems a good idea to be regular about it, so this is good from my point of view.
  Please just get one more developer to confirm (Chandler, Joerg, Richard or Douglas would do).


================
Comment at: lib/Frontend/InitPreprocessor.cpp:547
@@ -545,2 +546,3 @@
     Builder.defineMacro("__BYTE_ORDER__", "__ORDER_LITTLE_ENDIAN__");
-
+    Builder.defineMacro("__LITTLE_ENDIAN__", "1");
+  }
----------------
This should be just
 Builder.defineMacro("__LITTLE_ENDIAN__");
no? Similarly for the big endian case.
 


http://llvm-reviews.chandlerc.com/D2760



More information about the llvm-commits mailing list