1 //===-- MIDataTypes.h -------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 // File: MIDataTypes.h
13 // Overview: Common global switches, macros, etc.
15 // This file contains common data types required by applications
16 // generally. If supported by the compiler, this file should be
17 // #include'd as part of the project's PCH (precompiled header).
19 // Environment: Compilers: Visual C++ 12.
20 // gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
21 // Libraries: See MIReadmetxt.
28 //--------------------------------------------------------------------------------------
34 #include <crtdbg.h> // C-runtime debugging library (defines _ASSERT).
39 //--------------------------------------------------------------------------------------
40 // Common definitions:
42 // Function return status
45 const bool success = true;
46 const bool failure = false;
49 // Use to avoid "unused parameter" compiler warnings:
50 #define MIunused( x ) (void) x;
53 #define MI_NO_INITIALIZE_VTABLE __declspec( novtable )
54 #define MI_FORCE_INLINE __forceinline
56 #define MI_NO_INITIALIZE_VTABLE
57 #define MI_FORCE_INLINE inline
58 // __attribute__( ( always_inline ) )
63 typedef unsigned __int64 size_t;
64 typedef unsigned __int64 PointerToInteger_t;
65 typedef __int64 MIint;
66 typedef unsigned __int64 MIuint;
69 typedef unsigned int size_t;
70 typedef unsigned int PointerToInteger_t;
72 typedef unsigned int MIuint;
74 // typedef long unsigned int size_t; // size_t already defined
75 typedef unsigned int PointerToInteger_t;
77 typedef unsigned int MIuint;
83 //--------------------------------------------------------------------------------------
89 typedef char MIchar; // Defaults to signed char, i.e. MIschar.
90 typedef signed char MIschar; // Range: -128 to 127. More explicit than using MIchar.
91 typedef unsigned char MIuchar; // Range: 0 to 255.
92 typedef long long MIint64; // 64bit signed integer.
93 typedef unsigned long long MIuint64; // 64bit unsigned integer.
95 //using namespace std; // Better to put this or std:: at translation units scope.
97 //--------------------------------------------------------------------------------------
100 //--------------------------------------------------------------------------------------