[PATCH] D44197: TableGen: Remove OpInit::Fold

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 03:16:01 PST 2018


nhaehnle created this revision.
nhaehnle added reviewers: arsenm, craig.topper, tra, MartinO.
Herald added a subscriber: wdng.

Virtual dispatch is not actually used anywhere.

Change-Id: I9829c5c59920ea27fb9bc17f1442156a3bb09a65


Repository:
  rL LLVM

https://reviews.llvm.org/D44197

Files:
  include/llvm/TableGen/Record.h


Index: include/llvm/TableGen/Record.h
===================================================================
--- include/llvm/TableGen/Record.h
+++ include/llvm/TableGen/Record.h
@@ -742,10 +742,6 @@
   virtual unsigned getNumOperands() const = 0;
   virtual Init *getOperand(unsigned i) const = 0;
 
-  // Fold - If possible, fold this to a simpler init.  Return this if not
-  // possible to fold.
-  virtual Init *Fold(Record *CurRec) const = 0;
-
   Init *getBit(unsigned Bit) const override;
 };
 
@@ -792,7 +788,7 @@
 
   // Fold - If possible, fold this to a simpler init.  Return this if not
   // possible to fold.
-  Init *Fold(Record *CurRec) const override;
+  Init *Fold(Record *CurRec) const;
 
   Init *resolveReferences(Resolver &R) const override;
 
@@ -847,7 +843,7 @@
 
   // Fold - If possible, fold this to a simpler init.  Return this if not
   // possible to fold.
-  Init *Fold(Record *CurRec) const override;
+  Init *Fold(Record *CurRec) const;
 
   Init *resolveReferences(Resolver &R) const override;
 
@@ -905,7 +901,7 @@
 
   // Fold - If possible, fold this to a simpler init.  Return this if not
   // possible to fold.
-  Init *Fold(Record *CurRec) const override;
+  Init *Fold(Record *CurRec) const;
 
   bool isComplete() const override {
     return LHS->isComplete() && MHS->isComplete() && RHS->isComplete();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44197.137349.patch
Type: text/x-patch
Size: 1345 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180307/c931b658/attachment.bin>


More information about the llvm-commits mailing list