lib: Rename endianness.h to int_endianness.h (for consistency) and tidy up a bit.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@144669 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/endianness.h b/lib/int_endianness.h
similarity index 90%
rename from lib/endianness.h
rename to lib/int_endianness.h
index 9b7e7c1..9466ed4 100644
--- a/lib/endianness.h
+++ b/lib/int_endianness.h
@@ -1,4 +1,4 @@
-/* ===-- endianness.h - configuration header for compiler-rt ---------------===
+/* ===-- int_endianness.h - configuration header for compiler-rt ------------===
*
* The LLVM Compiler Infrastructure
*
@@ -13,13 +13,8 @@
* ===----------------------------------------------------------------------===
*/
-#ifndef ENDIANNESS_H
-#define ENDIANNESS_H
-
-/*
- * Known limitations:
- * Middle endian systems are not handled currently.
- */
+#ifndef INT_ENDIANNESS_H
+#define INT_ENDIANNESS_H
#if defined(__SVR4) && defined(__sun)
#include <sys/byteorder.h>
@@ -91,4 +86,4 @@
#error Unable to determine endian
#endif /* Check we found an endianness correctly. */
-#endif /* ENDIANNESS_H */
+#endif /* INT_ENDIANNESS_H */
diff --git a/lib/int_lib.h b/lib/int_lib.h
index f1c1b11..dd65b69 100644
--- a/lib/int_lib.h
+++ b/lib/int_lib.h
@@ -16,6 +16,10 @@
#ifndef INT_LIB_H
#define INT_LIB_H
+/* Assumption: Signed integral is 2's complement. */
+/* Assumption: Right shift of signed negative is arithmetic shift. */
+/* Assumption: Endianness is little or big (not mixed). */
+
/* ABI macro definitions */
#if __ARM_EABI__
@@ -27,12 +31,8 @@
# define COMPILER_RT_ABI
#endif
-/* Assumption: signed integral is 2's complement */
-/* Assumption: right shift of signed negative is arithmetic shift */
-
#include <limits.h>
#include <stdint.h>
-#include "endianness.h"
#include <math.h>
/* If compiling for kernel use, call panic() instead of abort(). */
diff --git a/lib/int_types.h b/lib/int_types.h
index cac4465..fcce390 100644
--- a/lib/int_types.h
+++ b/lib/int_types.h
@@ -18,7 +18,7 @@
#ifndef INT_TYPES_H
#define INT_TYPES_H
-#include "endianness.h"
+#include "int_endianness.h"
typedef int si_int;
typedef unsigned su_int;