dmd.globals
Stores command line options and contains other miscellaneous declarations.
License
Source: globals.d
Documentation: https://dlang.org/phobos/dmd_globals.html
-
Declaration
enum
DiagnosticReporting
: ubyte; -
Declaration
enum
CHECKENABLE
: ubyte; -
Declaration
enum
CHECKACTION
: ubyte; -
Declaration
enum
JsonFieldFlags
: uint;Each flag represents a field that can be included in the JSON output.
NOTE: set type to uint so its size matches C++ unsigned type
-
Declaration
enum
CppStdRevision
: uint;Version of C++ standard to support
-
Declaration
enum
FeatureState
: ubyte; -
Declaration
struct
Help
;Command line state related to printing usage about other switches
-
Declaration
struct
Param
;Put command line switches in here
-
Declaration
struct
Global
;Collection of global compiler settings and global state used by the frontend
-
Declaration
const(char)[]
inifilename
;filename of configuration file as given by
-conf=
, or default value -
Declaration
Array!(const(char)*)*
path
;Array of char*'s which form the import lookup
path
-
Declaration
Array!(const(char)*)*
filePath
;Array of char*'s which form the file import lookup path
-
Declaration
char[26]
datetime
;string returned by ctime()
-
Declaration
Param
params
;command line parameters
-
Declaration
uint
errors
;number of
errors
reported so far -
Declaration
uint
warnings
;number of
warnings
reported so far -
Declaration
uint
gag
;!=0 means
gag
reporting of errors & warnings -
Declaration
uint
gaggedErrors
;number of errors reported while gagged
-
Declaration
uint
gaggedWarnings
;number of warnings reported while gagged
-
Declaration
void*
console
;opaque pointer to
console
for controlling text attributes -
Declaration
Array!Identifier*
versionids
;command line versions and predefined versions
-
Declaration
Array!Identifier*
debugids
;command line debug versions and predefined versions
-
Declaration
bool
hasMainFunction
;Whether a main function has already been compiled in (for -main switch)
-
Declaration
uint
varSequenceNumber
;Relative lifetime of
VarDeclaration
within a function, used forscope
checks -
Declaration
FileManager
fileManager
;Cache files read from disk
-
Declaration
enum int
recursionLimit
;number of recursive template expansions before abort
-
Declaration
ErrorSink
errorSink
;where the error messages go
-
Declaration
ErrorSink
errorSinkNull
;where the error messages are ignored
-
Declaration
nothrow @safe uint
startGagging
();Start ignoring compile errors instead of reporting them.
Discussion
Used for speculative compilation like
__traits(compiles, XXX)
, but also internally to e.g. try out analias this
rewrite without comitting to it.
Works like a stack, so N calls to
should be paired with N calls tostartGagging
endGagging
.Return Value
the current number of gagged errors, which should later be passed to
endGagging
-
Declaration
nothrow @safe bool
endGagging
(uintoldGagged
);Stop gagging, restoring the old gagged state before the most recent call to
startGagging
.Parameters
uint
oldGagged
the previous number of errors, as returned by
startGagging
Return Value
true
if errors occurred while gagged. -
Declaration
nothrow @safe void
increaseErrorCount
();Increment the error count to record that an error has occurred in the current context.
Discussion
An error message may or may not have been printed.
-
Declaration
nothrow void
deinitialize
();Deinitializes the global state of the compiler.
Discussion
This can be used to restore the state set by
_init
to its original state. -
Declaration
nothrow @safe uint
versionNumber
();Return Value
the version as the number that would be returned for __VERSION__
-
Declaration
nothrow @safe string
versionString
();Return Value
compiler version string.
-
Declaration
nothrow const(char*)
versionChars
();Return Value
compiler version as char string.
-
-
Declaration
Global
global
;Collection of
global
state