From 1023f5a42d82fca71c191dd6c1001f79e07c63ae Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Sat, 4 Jun 2011 05:09:36 +0000 Subject: Silence compiler warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132624 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/SetTheory.cpp | 12 ++++++------ utils/TableGen/SetTheory.h | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'utils') diff --git a/utils/TableGen/SetTheory.cpp b/utils/TableGen/SetTheory.cpp index d2f1b22a10..e168b549bc 100644 --- a/utils/TableGen/SetTheory.cpp +++ b/utils/TableGen/SetTheory.cpp @@ -62,7 +62,7 @@ struct AndOp : public SetTheory::Operator { // SetIntBinOp - Abstract base class for (Op S, N) operators. struct SetIntBinOp : public SetTheory::Operator { - virtual void apply(SetTheory &ST, DagInit *Expr, + virtual void apply2(SetTheory &ST, DagInit *Expr, RecSet &Set, int64_t N, RecSet &Elts) =0; @@ -74,13 +74,13 @@ struct SetIntBinOp : public SetTheory::Operator { IntInit *II = dynamic_cast(Expr->arg_begin()[1]); if (!II) throw "Second argument must be an integer: " + Expr->getAsString(); - apply(ST, Expr, Set, II->getValue(), Elts); + apply2(ST, Expr, Set, II->getValue(), Elts); } }; // (shl S, N) Shift left, remove the first N elements. struct ShlOp : public SetIntBinOp { - void apply(SetTheory &ST, DagInit *Expr, + void apply2(SetTheory &ST, DagInit *Expr, RecSet &Set, int64_t N, RecSet &Elts) { if (N < 0) @@ -92,7 +92,7 @@ struct ShlOp : public SetIntBinOp { // (trunc S, N) Truncate after the first N elements. struct TruncOp : public SetIntBinOp { - void apply(SetTheory &ST, DagInit *Expr, + void apply2(SetTheory &ST, DagInit *Expr, RecSet &Set, int64_t N, RecSet &Elts) { if (N < 0) @@ -109,7 +109,7 @@ struct RotOp : public SetIntBinOp { RotOp(bool Rev) : Reverse(Rev) {} - void apply(SetTheory &ST, DagInit *Expr, + void apply2(SetTheory &ST, DagInit *Expr, RecSet &Set, int64_t N, RecSet &Elts) { if (Reverse) @@ -128,7 +128,7 @@ struct RotOp : public SetIntBinOp { // (decimate S, N) Pick every N'th element of S. struct DecimateOp : public SetIntBinOp { - void apply(SetTheory &ST, DagInit *Expr, + void apply2(SetTheory &ST, DagInit *Expr, RecSet &Set, int64_t N, RecSet &Elts) { if (N <= 0) diff --git a/utils/TableGen/SetTheory.h b/utils/TableGen/SetTheory.h index c648d46e60..2202f22396 100644 --- a/utils/TableGen/SetTheory.h +++ b/utils/TableGen/SetTheory.h @@ -66,6 +66,8 @@ public: /// Operator - A callback representing a DAG operator. struct Operator { + virtual ~Operator() {} + /// apply - Apply this operator to Expr's arguments and insert the result /// in Elts. virtual void apply(SetTheory&, DagInit *Expr, RecSet &Elts) =0; @@ -75,6 +77,8 @@ public: /// set into a fully expanded list of elements. Expanders provide a way for /// users to define named sets that can be used in DAG expressions. struct Expander { + virtual ~Expander() {} + virtual void expand(SetTheory&, Record*, RecSet &Elts) =0; }; -- cgit v1.2.3