Mercurial > projects > ldc
comparison dmd/cond.c @ 990:2137797748a8
oups, seems like I broke some constness in D1 last commit, compiles again!
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Thu, 26 Feb 2009 14:23:18 +0100 |
parents | 330f999ade44 |
children | b30fe7e1dbb9 |
comparison
equal
deleted
inserted
replaced
989:420ef073448d | 990:2137797748a8 |
---|---|
69 void DebugCondition::setGlobalLevel(unsigned level) | 69 void DebugCondition::setGlobalLevel(unsigned level) |
70 { | 70 { |
71 global.params.debuglevel = level; | 71 global.params.debuglevel = level; |
72 } | 72 } |
73 | 73 |
74 void DebugCondition::addGlobalIdent(char *ident) | 74 void DebugCondition::addGlobalIdent(const char *ident) |
75 { | 75 { |
76 if (!global.params.debugids) | 76 if (!global.params.debugids) |
77 global.params.debugids = new Array(); | 77 global.params.debugids = new Array(); |
78 global.params.debugids->push(ident); | 78 global.params.debugids->push((void*)ident); |
79 } | 79 } |
80 | 80 |
81 | 81 |
82 DebugCondition::DebugCondition(Module *mod, unsigned level, Identifier *ident) | 82 DebugCondition::DebugCondition(Module *mod, unsigned level, Identifier *ident) |
83 : DVCondition(mod, level, ident) | 83 : DVCondition(mod, level, ident) |
121 void VersionCondition::setGlobalLevel(unsigned level) | 121 void VersionCondition::setGlobalLevel(unsigned level) |
122 { | 122 { |
123 global.params.versionlevel = level; | 123 global.params.versionlevel = level; |
124 } | 124 } |
125 | 125 |
126 void VersionCondition::checkPredefined(Loc loc, char *ident) | 126 void VersionCondition::checkPredefined(Loc loc, const char *ident) |
127 { | 127 { |
128 static const char* reserved[] = | 128 static const char* reserved[] = |
129 { | 129 { |
130 "DigitalMars", "LLVM", "LDC", "LLVM64", | 130 "DigitalMars", "LLVM", "LDC", "LLVM64", |
131 "X86", "X86_64", "PPC", "PPC64", | 131 "X86", "X86_64", "PPC", "PPC64", |
149 | 149 |
150 Lerror: | 150 Lerror: |
151 error(loc, "version identifier '%s' is reserved and cannot be set", ident); | 151 error(loc, "version identifier '%s' is reserved and cannot be set", ident); |
152 } | 152 } |
153 | 153 |
154 void VersionCondition::addGlobalIdent(char *ident) | 154 void VersionCondition::addGlobalIdent(const char *ident) |
155 { | 155 { |
156 checkPredefined(0, ident); | 156 checkPredefined(0, ident); |
157 addPredefinedGlobalIdent(ident); | 157 addPredefinedGlobalIdent(ident); |
158 } | 158 } |
159 | 159 |
160 void VersionCondition::addPredefinedGlobalIdent(char *ident) | 160 void VersionCondition::addPredefinedGlobalIdent(const char *ident) |
161 { | 161 { |
162 if (!global.params.versionids) | 162 if (!global.params.versionids) |
163 global.params.versionids = new Array(); | 163 global.params.versionids = new Array(); |
164 global.params.versionids->push(ident); | 164 global.params.versionids->push((void*)ident); |
165 } | 165 } |
166 | 166 |
167 | 167 |
168 VersionCondition::VersionCondition(Module *mod, unsigned level, Identifier *ident) | 168 VersionCondition::VersionCondition(Module *mod, unsigned level, Identifier *ident) |
169 : DVCondition(mod, level, ident) | 169 : DVCondition(mod, level, ident) |