mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 01:20:51 +03:00
Remove old unused declarations
This commit is contained in:
parent
4e2d45a409
commit
ac2524d129
11 changed files with 8 additions and 31 deletions
|
@ -49,10 +49,7 @@ public:
|
||||||
/// Return index of the field, or -1 if not found
|
/// Return index of the field, or -1 if not found
|
||||||
/// Same as getFieldIndex, but checks for a direct match with the VarDeclaration
|
/// Same as getFieldIndex, but checks for a direct match with the VarDeclaration
|
||||||
int findFieldIndexByName(VarDeclaration *v);
|
int findFieldIndexByName(VarDeclaration *v);
|
||||||
#if IN_LLVM
|
#if IN_DMD
|
||||||
DValue* toElem(IRState* irs);
|
|
||||||
llvm::Constant* toConstElem(IRState *irs);
|
|
||||||
#else
|
|
||||||
Symbol* toSymbol();
|
Symbol* toSymbol();
|
||||||
#endif
|
#endif
|
||||||
void accept(Visitor *v) { v->visit(this); }
|
void accept(Visitor *v) { v->visit(this); }
|
||||||
|
|
|
@ -945,8 +945,6 @@ VarDeclaration::VarDeclaration(Loc loc, Type *type, Identifier *id, Initializer
|
||||||
rundtor = NULL;
|
rundtor = NULL;
|
||||||
edtor = NULL;
|
edtor = NULL;
|
||||||
range = NULL;
|
range = NULL;
|
||||||
#if IN_LLVM
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Dsymbol *VarDeclaration::syntaxCopy(Dsymbol *s)
|
Dsymbol *VarDeclaration::syntaxCopy(Dsymbol *s)
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#endif /* __DMC__ */
|
#endif /* __DMC__ */
|
||||||
|
|
||||||
#if IN_LLVM
|
#if IN_LLVM
|
||||||
#include <set>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -37,10 +36,6 @@ class StructDeclaration;
|
||||||
struct InterState;
|
struct InterState;
|
||||||
struct IRState;
|
struct IRState;
|
||||||
struct CompiledCtfeFunction;
|
struct CompiledCtfeFunction;
|
||||||
#if IN_LLVM
|
|
||||||
class AnonDeclaration;
|
|
||||||
class LabelStatement;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum PROT;
|
enum PROT;
|
||||||
enum LINK;
|
enum LINK;
|
||||||
|
@ -339,9 +334,6 @@ public:
|
||||||
// Eliminate need for dynamic_cast
|
// Eliminate need for dynamic_cast
|
||||||
VarDeclaration *isVarDeclaration() { return (VarDeclaration *)this; }
|
VarDeclaration *isVarDeclaration() { return (VarDeclaration *)this; }
|
||||||
void accept(Visitor *v) { v->visit(this); }
|
void accept(Visitor *v) { v->visit(this); }
|
||||||
|
|
||||||
#if IN_LLVM
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
|
|
|
@ -1362,9 +1362,6 @@ void FuncDeclaration::semantic3(Scope *sc)
|
||||||
if (this->ident != Id::require && this->ident != Id::ensure)
|
if (this->ident != Id::require && this->ident != Id::ensure)
|
||||||
sc2->flags = sc->flags & ~SCOPEcontract;
|
sc2->flags = sc->flags & ~SCOPEcontract;
|
||||||
sc2->flags &= ~SCOPEcompile;
|
sc2->flags &= ~SCOPEcompile;
|
||||||
#if IN_LLVM
|
|
||||||
sc2->enclosingScopeExit = NULL;
|
|
||||||
#endif
|
|
||||||
sc2->tf = NULL;
|
sc2->tf = NULL;
|
||||||
sc2->os = NULL;
|
sc2->os = NULL;
|
||||||
sc2->noctor = 0;
|
sc2->noctor = 0;
|
||||||
|
|
|
@ -184,11 +184,6 @@ enum TOK
|
||||||
|
|
||||||
TOKinterval,
|
TOKinterval,
|
||||||
|
|
||||||
// LDC specific
|
|
||||||
#if IN_LLVM
|
|
||||||
TOKgep,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
TOKMAX
|
TOKMAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -61,9 +61,6 @@ Scope::Scope()
|
||||||
this->sw = NULL;
|
this->sw = NULL;
|
||||||
this->tf = NULL;
|
this->tf = NULL;
|
||||||
this->os = NULL;
|
this->os = NULL;
|
||||||
#if IN_LLVM
|
|
||||||
this->enclosingScopeExit = NULL;
|
|
||||||
#endif
|
|
||||||
this->tinst = NULL;
|
this->tinst = NULL;
|
||||||
this->sbreak = NULL;
|
this->sbreak = NULL;
|
||||||
this->scontinue = NULL;
|
this->scontinue = NULL;
|
||||||
|
|
|
@ -84,7 +84,6 @@ struct Scope
|
||||||
TryFinallyStatement *tf; // enclosing try finally statement
|
TryFinallyStatement *tf; // enclosing try finally statement
|
||||||
OnScopeStatement *os; // enclosing scope(xxx) statement
|
OnScopeStatement *os; // enclosing scope(xxx) statement
|
||||||
TemplateInstance *tinst; // enclosing template instance
|
TemplateInstance *tinst; // enclosing template instance
|
||||||
Statement *enclosingScopeExit; // enclosing statement that wants to do something on scope exit
|
|
||||||
Statement *sbreak; // enclosing statement that supports "break"
|
Statement *sbreak; // enclosing statement that supports "break"
|
||||||
Statement *scontinue; // enclosing statement that supports "continue"
|
Statement *scontinue; // enclosing statement that supports "continue"
|
||||||
ForeachStatement *fes; // if nested function for ForeachStatement, this is it
|
ForeachStatement *fes; // if nested function for ForeachStatement, this is it
|
||||||
|
|
|
@ -384,10 +384,6 @@ public:
|
||||||
|
|
||||||
TemplateInstance *isTemplateInstance() { return this; }
|
TemplateInstance *isTemplateInstance() { return this; }
|
||||||
void accept(Visitor *v) { v->visit(this); }
|
void accept(Visitor *v) { v->visit(this); }
|
||||||
|
|
||||||
#if IN_LLVM
|
|
||||||
void codegen(IRState*);
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class TemplateMixin : public TemplateInstance
|
class TemplateMixin : public TemplateInstance
|
||||||
|
|
|
@ -793,7 +793,6 @@ Statement *AsmBlockStatement::syntaxCopy()
|
||||||
Statement *AsmBlockStatement::semantic(Scope *sc)
|
Statement *AsmBlockStatement::semantic(Scope *sc)
|
||||||
{
|
{
|
||||||
enclosingFinally = sc->tf;
|
enclosingFinally = sc->tf;
|
||||||
enclosingScopeExit = sc->enclosingScopeExit;
|
|
||||||
|
|
||||||
return CompoundStatement::semantic(sc);
|
return CompoundStatement::semantic(sc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "gen/dibuilder.h"
|
#include "gen/dibuilder.h"
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <set>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
|
@ -324,6 +324,12 @@ public:
|
||||||
s->enclosingScopeExit = enclosingTryFinally();
|
s->enclosingScopeExit = enclosingTryFinally();
|
||||||
StatementVisitor::visit(s);
|
StatementVisitor::visit(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void visit(AsmBlockStatement *s)
|
||||||
|
{
|
||||||
|
s->enclosingScopeExit = enclosingTryFinally();
|
||||||
|
StatementVisitor::visit(s);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue