[llvm-commits] [llvm] r132624 - in /llvm/trunk/utils/TableGen: SetTheory.cpp SetTheory.h
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Jun 3 22:09:37 PDT 2011
Author: stoklund
Date: Sat Jun 4 00:09:36 2011
New Revision: 132624
URL: http://llvm.org/viewvc/llvm-project?rev=132624&view=rev
Log:
Silence compiler warnings.
Modified:
llvm/trunk/utils/TableGen/SetTheory.cpp
llvm/trunk/utils/TableGen/SetTheory.h
Modified: llvm/trunk/utils/TableGen/SetTheory.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SetTheory.cpp?rev=132624&r1=132623&r2=132624&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/SetTheory.cpp (original)
+++ llvm/trunk/utils/TableGen/SetTheory.cpp Sat Jun 4 00:09:36 2011
@@ -62,7 +62,7 @@
// 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 @@
IntInit *II = dynamic_cast<IntInit*>(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 @@
// (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 @@
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 @@
// (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)
Modified: llvm/trunk/utils/TableGen/SetTheory.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SetTheory.h?rev=132624&r1=132623&r2=132624&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/SetTheory.h (original)
+++ llvm/trunk/utils/TableGen/SetTheory.h Sat Jun 4 00:09:36 2011
@@ -66,6 +66,8 @@
/// 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 @@
/// 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;
};
More information about the llvm-commits
mailing list