[llvm-commits] CVS: llvm/utils/TableGen/Record.cpp Record.h

Chris Lattner lattner at cs.uiuc.edu
Mon Aug 4 00:05:51 PDT 2003


Changes in directory llvm/utils/TableGen:

Record.cpp updated: 1.23 -> 1.24
Record.h updated: 1.28 -> 1.29

---
Log message:

It appears that somehow we forgot to add support for code variables.
Fix bug: TableGen/2003-08-03-PassCode.td


---
Diffs of the changes:

Index: llvm/utils/TableGen/Record.cpp
diff -u llvm/utils/TableGen/Record.cpp:1.23 llvm/utils/TableGen/Record.cpp:1.24
--- llvm/utils/TableGen/Record.cpp:1.23	Sun Aug  3 23:50:57 2003
+++ llvm/utils/TableGen/Record.cpp	Sun Aug  3 23:53:50 2003
@@ -146,6 +146,12 @@
   return 0;
 }
 
+Init *CodeRecTy::convertValue(TypedInit *TI) {
+  if (TI->getType()->typeIsConvertibleTo(this))
+    return TI;
+  return 0;
+}
+
 Init *DagRecTy::convertValue(TypedInit *TI) {
   if (TI->getType()->typeIsConvertibleTo(this))
     return TI;


Index: llvm/utils/TableGen/Record.h
diff -u llvm/utils/TableGen/Record.h:1.28 llvm/utils/TableGen/Record.h:1.29
--- llvm/utils/TableGen/Record.h:1.28	Sun Aug  3 23:50:57 2003
+++ llvm/utils/TableGen/Record.h	Sun Aug  3 23:53:50 2003
@@ -207,6 +207,7 @@
 struct CodeRecTy : public RecTy {
   Init *convertValue(UnsetInit *UI) { return (Init*)UI; }
   Init *convertValue( CodeInit *CI) { return (Init*)CI; }
+  Init *convertValue(TypedInit *TI);
 
   void print(std::ostream &OS) const { OS << "code"; }
 





More information about the llvm-commits mailing list