Daily bump.
[gcc.git] / libphobos / src / std / compiler.d
blob4ea5bd72433731a7f0356c2a9139f1c7d00852d9
1 // Written in the D programming language.
3 /**
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)
16 module std.compiler;
18 immutable
20 /// Vendor specific string naming the compiler, for example: "Digital Mars D".
21 string name = __VENDOR__;
23 /// Master list of D compiler vendors.
24 enum Vendor
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)
30 dotNET = 4, /// D.NET
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;
44 /**
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
52 /**
53 * The version of the D Programming Language Specification
54 * supported by the compiler.
56 uint D_major = 2;
57 uint D_minor = 0;