]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MIDataTypes.h
Merge ^/head r275623 through 275634.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MIDataTypes.h
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 //++
11 // File:                MIDataTypes.h
12 //
13 // Overview:    Common global switches, macros, etc.
14 //
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).
18 //
19 // Environment: Compilers:      Visual C++ 12.
20 //                                                      gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
21 //                              Libraries:      See MIReadmetxt. 
22 //
23 // Copyright:   None.
24 //--
25
26 #pragma once
27
28 //--------------------------------------------------------------------------------------
29 // Windows headers:
30 #ifdef _WIN32
31
32 // Debugging:
33 #ifdef _DEBUG
34 #include <crtdbg.h>                     // C-runtime debugging library (defines _ASSERT).
35 #endif // _DEBUG
36
37 #endif // _WIN32
38
39 //--------------------------------------------------------------------------------------
40 // Common definitions:
41
42 // Function return status
43 namespace MIstatus
44 {
45         const bool success = true;
46         const bool failure = false;
47 }
48
49 // Use to avoid "unused parameter" compiler warnings:
50 #define MIunused( x ) (void) x;
51
52 #ifdef _WIN32
53 #define MI_NO_INITIALIZE_VTABLE __declspec( novtable )
54 #define MI_FORCE_INLINE __forceinline
55 #else
56 #define MI_NO_INITIALIZE_VTABLE
57 #define MI_FORCE_INLINE inline
58 // __attribute__( ( always_inline ) )
59 #endif // _WIN32
60
61 // Portability issues
62 #ifdef  _WIN64
63         typedef unsigned __int64  size_t;
64         typedef unsigned __int64  PointerToInteger_t;
65         typedef                  __int64  MIint;
66         typedef unsigned __int64  MIuint;
67 #else
68         #ifdef _WIN32
69                 typedef  unsigned int size_t;
70                 typedef  unsigned int PointerToInteger_t;
71                 typedef                   int MIint;
72                 typedef  unsigned int MIuint;
73         #else
74 //              typedef  long unsigned int size_t; // size_t already defined
75                 typedef  unsigned int PointerToInteger_t;
76                 typedef                   int MIint;
77                 typedef  unsigned int MIuint;
78
79                 #define MAX_PATH        4096
80         #endif // _WIN32
81 #endif // _WIN64
82
83 //--------------------------------------------------------------------------------------
84 // Common types:
85
86 // Fundamentals:
87 typedef float                           MIflt;
88 typedef double                          MIdbl;
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.
94
95 //using namespace std;  // Better to put this or std:: at translation units scope.
96
97 //--------------------------------------------------------------------------------------
98 // Common routines:
99
100 //--------------------------------------------------------------------------------------