1 // Written in the D programming language.
4 * Identify the compiler used and its various features.
6 * Copyright: Copyright The D Language Foundation 2000 - 2011.
7 * License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
8 * Authors: $(HTTP digitalmars.com, Walter Bright), Alex Rønne Petersen
9 * Source: $(PHOBOSSRC std/compiler.d)
11 /* Copyright The D Language Foundation 2000 - 2011.
12 * Distributed under the Boost Software License, Version 1.0.
13 * (See accompanying file LICENSE_1_0.txt or copy at
14 * http://www.boost.org/LICENSE_1_0.txt)
20 /// Vendor specific string naming the compiler, for example: "Digital Mars D".
21 string name
= __VENDOR__
;
23 /// Master list of D compiler vendors.
26 unknown
= 0, /// Compiler vendor could not be detected
27 digitalMars
= 1, /// Digital Mars D (DMD)
28 gnu
= 2, /// GNU D Compiler (GDC)
29 llvm
= 3, /// LLVM D Compiler (LDC)
31 sdc
= 5, /// Snazzy D Compiler (SDC)
34 /// Which vendor produced this compiler.
35 version (StdDdoc
) Vendor vendor
;
36 else version (DigitalMars
) Vendor vendor
= Vendor
.digitalMars
;
37 else version (GNU
) Vendor vendor
= Vendor
.gnu
;
38 else version (LDC
) Vendor vendor
= Vendor
.llvm
;
39 else version (D_NET
) Vendor vendor
= Vendor
.dotNET
;
40 else version (SDC
) Vendor vendor
= Vendor
.sdc
;
41 else Vendor vendor
= Vendor
.unknown
;
45 * The vendor specific version number, as in
46 * version_major.version_minor
48 uint version_major
= __VERSION__
/ 1000;
49 uint version_minor
= __VERSION__
% 1000; /// ditto
53 * The version of the D Programming Language Specification
54 * supported by the compiler.