Remove old unused declarations

This commit is contained in:
Alexey Prokhin 2014-09-22 18:54:57 +04:00
parent 4e2d45a409
commit ac2524d129
11 changed files with 8 additions and 31 deletions

View file

@ -49,10 +49,7 @@ public:
/// Return index of the field, or -1 if not found
/// Same as getFieldIndex, but checks for a direct match with the VarDeclaration
int findFieldIndexByName(VarDeclaration *v);
#if IN_LLVM
DValue* toElem(IRState* irs);
llvm::Constant* toConstElem(IRState *irs);
#else
#if IN_DMD
Symbol* toSymbol();
#endif
void accept(Visitor *v) { v->visit(this); }

View file

@ -945,8 +945,6 @@ VarDeclaration::VarDeclaration(Loc loc, Type *type, Identifier *id, Initializer
rundtor = NULL;
edtor = NULL;
range = NULL;
#if IN_LLVM
#endif
}
Dsymbol *VarDeclaration::syntaxCopy(Dsymbol *s)

View file

@ -17,7 +17,6 @@
#endif /* __DMC__ */
#if IN_LLVM
#include <set>
#include <string>
#endif
@ -37,10 +36,6 @@ class StructDeclaration;
struct InterState;
struct IRState;
struct CompiledCtfeFunction;
#if IN_LLVM
class AnonDeclaration;
class LabelStatement;
#endif
enum PROT;
enum LINK;
@ -339,9 +334,6 @@ public:
// Eliminate need for dynamic_cast
VarDeclaration *isVarDeclaration() { return (VarDeclaration *)this; }
void accept(Visitor *v) { v->visit(this); }
#if IN_LLVM
#endif
};
/**************************************************************/

View file

@ -1362,9 +1362,6 @@ void FuncDeclaration::semantic3(Scope *sc)
if (this->ident != Id::require && this->ident != Id::ensure)
sc2->flags = sc->flags & ~SCOPEcontract;
sc2->flags &= ~SCOPEcompile;
#if IN_LLVM
sc2->enclosingScopeExit = NULL;
#endif
sc2->tf = NULL;
sc2->os = NULL;
sc2->noctor = 0;

View file

@ -184,11 +184,6 @@ enum TOK
TOKinterval,
// LDC specific
#if IN_LLVM
TOKgep,
#endif
TOKMAX
};

View file

@ -61,9 +61,6 @@ Scope::Scope()
this->sw = NULL;
this->tf = NULL;
this->os = NULL;
#if IN_LLVM
this->enclosingScopeExit = NULL;
#endif
this->tinst = NULL;
this->sbreak = NULL;
this->scontinue = NULL;

View file

@ -84,7 +84,6 @@ struct Scope
TryFinallyStatement *tf; // enclosing try finally statement
OnScopeStatement *os; // enclosing scope(xxx) statement
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 *scontinue; // enclosing statement that supports "continue"
ForeachStatement *fes; // if nested function for ForeachStatement, this is it

View file

@ -384,10 +384,6 @@ public:
TemplateInstance *isTemplateInstance() { return this; }
void accept(Visitor *v) { v->visit(this); }
#if IN_LLVM
void codegen(IRState*);
#endif
};
class TemplateMixin : public TemplateInstance

View file

@ -793,7 +793,6 @@ Statement *AsmBlockStatement::syntaxCopy()
Statement *AsmBlockStatement::semantic(Scope *sc)
{
enclosingFinally = sc->tf;
enclosingScopeExit = sc->enclosingScopeExit;
return CompoundStatement::semantic(sc);
}

View file

@ -23,6 +23,7 @@
#include "gen/dibuilder.h"
#include <deque>
#include <list>
#include <set>
#include <sstream>
#include <vector>

View file

@ -324,6 +324,12 @@ public:
s->enclosingScopeExit = enclosingTryFinally();
StatementVisitor::visit(s);
}
void visit(AsmBlockStatement *s)
{
s->enclosingScopeExit = enclosingTryFinally();
StatementVisitor::visit(s);
}
};
//////////////////////////////////////////////////////////////////////////////