1 //===-- MIDataTypes.h -------------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // Overview: Common global switches, macros, etc. 11 // 12 // This file contains common data types required by applications 13 // generally. If supported by the compiler, this file should be 14 // #include'd as part of the project's PCH (precompiled header). 15 16 #pragma once 17 18 //-------------------------------------------------------------------------------------- 19 // Windows headers: 20 #ifdef _WIN32 21 22 // Debugging: 23 #ifdef _DEBUG 24 #include <crtdbg.h> 25 #endif // _DEBUG 26 27 #endif // _WIN32 28 29 //-------------------------------------------------------------------------------------- 30 // Common definitions: 31 32 // Function return status 33 namespace MIstatus { 34 const bool success = true; 35 const bool failure = false; 36 } 37 38 // Use to avoid "unused parameter" compiler warnings: 39 #define MIunused(x) (void)x; 40 41 // Portability issues 42 #ifdef _WIN64 43 typedef unsigned __int64 size_t; 44 typedef __int64 MIint; 45 typedef unsigned __int64 MIuint; 46 #else 47 #ifdef _WIN32 48 typedef unsigned int size_t; 49 typedef int MIint; 50 typedef unsigned int MIuint; 51 #else 52 typedef int MIint; 53 typedef unsigned int MIuint; 54 55 #define MAX_PATH 4096 56 #endif // _WIN32 57 #endif // _WIN64 58 59 //-------------------------------------------------------------------------------------- 60 // Common types: 61 62 // Fundamentals: 63 typedef long long MIint64; // 64bit signed integer. 64 typedef unsigned long long MIuint64; // 64bit unsigned integer. 65