classof implementations for all classes

This commit is contained in:
Anton Mitrokhin
2015-07-10 12:27:16 +03:00
parent 8217448ee5
commit 9f083f99ac
7 changed files with 242 additions and 20 deletions

View File

@@ -1112,7 +1112,6 @@ UnaryExpr::UnaryExpr(Op o, Expr *e, SourcePos p)
expr = e;
}
llvm::Value *
UnaryExpr::GetValue(FunctionEmitContext *ctx) const {
if (expr == NULL)
@@ -4725,6 +4724,11 @@ public:
StructMemberExpr(Expr *e, const char *id, SourcePos p,
SourcePos idpos, bool derefLValue);
static inline bool classof(StructMemberExpr const*) { return true; }
static inline bool classof(ASTNode const* N) {
return N->getValueID() == StructMemberExprID;
}
const Type *GetType() const;
const Type *GetLValueType() const;
int getElementNumber() const;
@@ -4892,6 +4896,11 @@ public:
VectorMemberExpr(Expr *e, const char *id, SourcePos p,
SourcePos idpos, bool derefLValue);
static inline bool classof(VectorMemberExpr const*) { return true; }
static inline bool classof(ASTNode const* N) {
return N->getValueID() == VectorMemberExprID;
}
llvm::Value *GetValue(FunctionEmitContext* ctx) const;
llvm::Value *GetLValue(FunctionEmitContext* ctx) const;
const Type *GetType() const;