* DataTypesFix.h moved to AIXDataTypesFix.h
authorMisha Brukman <brukman+llvm@gmail.com>
Tue, 26 Oct 2004 16:15:18 +0000 (16:15 +0000)
committerMisha Brukman <brukman+llvm@gmail.com>
Tue, 26 Oct 2004 16:15:18 +0000 (16:15 +0000)
* Condition #inclusion of AIXDataTypes.h on the _AIX preprocessor symbol to
  prevent extra I/O on non-AIX systems.  Thus, no #ifdef in AIXDataTypes.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17257 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/AIXDataTypesFix.h [new file with mode: 0644]
include/llvm/Support/DataTypes.h.in
include/llvm/Support/DataTypesFix.h [deleted file]

diff --git a/include/llvm/Support/AIXDataTypesFix.h b/include/llvm/Support/AIXDataTypesFix.h
new file mode 100644 (file)
index 0000000..36b4488
--- /dev/null
@@ -0,0 +1,25 @@
+//===-- include/Support/AIXDataTypesFix.h - Fix datatype defs ---*- C++ -*-===//
+// 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
+//
+// This file overrides default system-defined types and limits which cannot be
+// done in DataTypes.h.in because it is processed by autoheader first, which
+// comments out any #undef statement
+//
+//===----------------------------------------------------------------------===//
+
+// No include guards desired!
+
+#ifndef SUPPORT_DATATYPES_H
+#error "AIXDataTypesFix.h must only be included via DataTypes.h!"
+#endif
+
+// GCC is strict about defining large constants: they must have LL modifier.
+// These will be defined properly at the end of DataTypes.h
+#undef INT64_MAX
+#undef INT64_MIN
index f5467b2220f849bbe4e0601920c5328a7cd1a396..4fc2d079ae44c8a0b1fb1b6c70ff14eab544a0c7 100644 (file)
@@ -49,8 +49,9 @@
 #include <stdint.h>
 #endif
 
-// Fix AIX definitions of INT64_{MIN,MAX}
-#include "llvm/Support/DataTypesFix.h"
+#ifdef _AIX
+#include "llvm/Support/AIXDataTypesFix.h"
+#endif
 
 // Handle incorrect definition of uint64_t as u_int64_t
 #ifndef HAVE_UINT64_T
diff --git a/include/llvm/Support/DataTypesFix.h b/include/llvm/Support/DataTypesFix.h
deleted file mode 100644 (file)
index c73998d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-//===-- include/Support/DataTypesFix.h - Fix datatype defs ------*- C++ -*-===//
-// 
-//                     The LLVM Compiler Infrastructure
-//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
-//===----------------------------------------------------------------------===//
-//
-// This file overrides default system-defined types and limits which cannot be
-// done in DataTypes.h.in because it is processed by autoheader first, which
-// comments out any #undef statement
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef SUPPORT_DATATYPESFIX_H
-#define SUPPORT_DATATYPESFIX_H
-
-#include "llvm/Config/config.h"
-
-#if defined(_POWER) && defined(_AIX)
-// GCC is strict about defining large constants: they must have LL modifier.
-#undef INT64_MAX
-#define INT64_MAX 9223372036854775807LL
-#undef INT64_MIN
-#define INT64_MIN (-INT64_MAX-1) 
-#endif
-
-#endif  /* SUPPORT_DATATYPESFIX_H */