mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 08:30:47 +03:00
Get rid of superfluous IrDsymbol state Initialized
This commit is contained in:
parent
3f452646f5
commit
209ba2553d
3 changed files with 1 additions and 12 deletions
|
@ -863,9 +863,6 @@ void DtoResolveVariable(VarDeclaration *vd) {
|
|||
|
||||
auto irGlobal = getIrGlobal(vd, true);
|
||||
irGlobal->getValue();
|
||||
|
||||
assert(!vd->ir->isInitialized());
|
||||
vd->ir->setInitialized();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,12 +67,6 @@ void IrDsymbol::setDeclared() {
|
|||
}
|
||||
}
|
||||
|
||||
void IrDsymbol::setInitialized() {
|
||||
if (m_state < Initialized) {
|
||||
m_state = Initialized;
|
||||
}
|
||||
}
|
||||
|
||||
void IrDsymbol::setDefined() {
|
||||
if (m_state < Defined) {
|
||||
m_state = Defined;
|
||||
|
|
|
@ -45,7 +45,7 @@ struct IrDsymbol {
|
|||
FieldType
|
||||
};
|
||||
|
||||
enum State { Initial, Resolved, Declared, Initialized, Defined };
|
||||
enum State { Initial, Resolved, Declared, Defined };
|
||||
|
||||
static std::vector<IrDsymbol *> list;
|
||||
static void resetAll();
|
||||
|
@ -63,12 +63,10 @@ struct IrDsymbol {
|
|||
|
||||
bool isResolved() const { return m_state >= Resolved; }
|
||||
bool isDeclared() const { return m_state >= Declared; }
|
||||
bool isInitialized() const { return m_state >= Initialized; }
|
||||
bool isDefined() const { return m_state >= Defined; }
|
||||
|
||||
void setResolved();
|
||||
void setDeclared();
|
||||
void setInitialized();
|
||||
void setDefined();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue