forked from D-Programming-GDC/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
126 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
|
||
/* Compiler implementation of the D programming language | ||
* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved | ||
* written by Walter Bright | ||
* http://www.digitalmars.com | ||
* Distributed under the Boost Software License, Version 1.0. | ||
* http://www.boost.org/LICENSE_1_0.txt | ||
* https://github.com/dlang/dmd/blob/master/src/dmd/globaltypes.h | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "root/dsystem.h" | ||
|
||
typedef unsigned char Diagnostic; | ||
enum | ||
{ | ||
DIAGNOSTICerror, // generate an error | ||
DIAGNOSTICinform, // generate a warning | ||
DIAGNOSTICoff // disable diagnostic | ||
}; | ||
|
||
// The state of array bounds checking | ||
typedef unsigned char CHECKENABLE; | ||
enum | ||
{ | ||
CHECKENABLEdefault, // initial value | ||
CHECKENABLEoff, // never do bounds checking | ||
CHECKENABLEon, // always do bounds checking | ||
CHECKENABLEsafeonly // do bounds checking only in @safe functions | ||
}; | ||
|
||
typedef unsigned char CHECKACTION; | ||
enum | ||
{ | ||
CHECKACTION_D, // call D assert on failure | ||
CHECKACTION_C, // call C assert on failure | ||
CHECKACTION_halt // cause program halt on failure | ||
}; | ||
|
||
enum CPU | ||
{ | ||
x87, | ||
mmx, | ||
sse, | ||
sse2, | ||
sse3, | ||
ssse3, | ||
sse4_1, | ||
sse4_2, | ||
avx, // AVX1 instruction set | ||
avx2, // AVX2 instruction set | ||
avx512, // AVX-512 instruction set | ||
|
||
// Special values that don't survive past the command line processing | ||
baseline, // (default) the minimum capability CPU | ||
native // the machine the compiler is being run on | ||
}; | ||
|
||
enum CppStdRevision | ||
{ | ||
CppStdRevisionCpp98 = 199711, | ||
CppStdRevisionCpp11 = 201103, | ||
CppStdRevisionCpp14 = 201402, | ||
CppStdRevisionCpp17 = 201703 | ||
}; | ||
|
||
typedef unsigned structalign_t; | ||
// magic value means "match whatever the underlying C compiler does" | ||
// other values are all powers of 2 | ||
#define STRUCTALIGN_DEFAULT ((structalign_t) ~0) | ||
|
||
// Be careful not to care about sign when using dinteger_t | ||
// use this instead of integer_t to | ||
// avoid conflicts with system #include's | ||
typedef uint64_t dinteger_t; | ||
// Signed and unsigned variants | ||
typedef int64_t sinteger_t; | ||
typedef uint64_t uinteger_t; | ||
|
||
typedef int8_t d_int8; | ||
typedef uint8_t d_uns8; | ||
typedef int16_t d_int16; | ||
typedef uint16_t d_uns16; | ||
typedef int32_t d_int32; | ||
typedef uint32_t d_uns32; | ||
typedef int64_t d_int64; | ||
typedef uint64_t d_uns64; | ||
|
||
enum LINK | ||
{ | ||
LINKdefault, | ||
LINKd, | ||
LINKc, | ||
LINKcpp, | ||
LINKwindows, | ||
LINKobjc, | ||
LINKsystem | ||
}; | ||
|
||
enum CPPMANGLE | ||
{ | ||
CPPMANGLEdefault, | ||
CPPMANGLEstruct, | ||
CPPMANGLEclass | ||
}; | ||
|
||
enum MATCH | ||
{ | ||
MATCHnomatch, // no match | ||
MATCHconvert, // match with conversions | ||
MATCHconst, // match with conversion to const | ||
MATCHexact // exact match | ||
}; | ||
|
||
enum PINLINE | ||
{ | ||
PINLINEdefault, // as specified on the command line | ||
PINLINEnever, // never inline | ||
PINLINEalways // always inline | ||
}; | ||
|
||
typedef uinteger_t StorageClass; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,4 @@ | |
|
||
#pragma once | ||
|
||
#include "d-system.h" | ||
#include "d/d-system.h" |