# HG changeset patch # User Tomas Lindquist Olsen # Date 1235669330 -3600 # Node ID 2b6c2e961f25087605a037e1567824cb68cd3202 # Parent ff22650d0ca3e305c9fa34f7f5b6bae4398b3873 Added some missing version identifiers. diff -r ff22650d0ca3 -r 2b6c2e961f25 gen/main.cpp --- a/gen/main.cpp Thu Feb 26 18:02:13 2009 +0100 +++ b/gen/main.cpp Thu Feb 26 18:28:50 2009 +0100 @@ -133,10 +133,15 @@ global.params.objfiles = new Array(); global.params.ddocfiles = new Array(); + // Set predefined version identifiers VersionCondition::addPredefinedGlobalIdent("LLVM"); VersionCondition::addPredefinedGlobalIdent("LDC"); VersionCondition::addPredefinedGlobalIdent("all"); +#if DMDV2 + VersionCondition::addPredefinedGlobalIdent("D_Version2"); +#endif + // read the inifile #if DMDV2 @@ -442,9 +447,10 @@ } // a generic 64bit version - // why isn't this in D to begin with ? if (global.params.is64bit) { VersionCondition::addPredefinedGlobalIdent("LLVM64"); + // FIXME: is this always correct? + VersionCondition::addPredefinedGlobalIdent("D_LP64"); } // parse the OS out of the target triple @@ -508,6 +514,12 @@ if (global.params.doDocComments) VersionCondition::addPredefinedGlobalIdent("D_Ddoc"); +#if DMDV2 + // unittests? + if (global.params.useUnitTests) + VersionCondition::addPredefinedGlobalIdent("unittest"); +#endif + // Initialization Type::init(); Id::initialize();