[llvm-commits] CVS: llvm/utils/TableGen/CodeGenTarget.h InstrInfoEmitter.h InstrSelectorEmitter.h Record.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Oct 27 09:06:41 PDT 2004
Changes in directory llvm/utils/TableGen:
CodeGenTarget.h updated: 1.14 -> 1.15
InstrInfoEmitter.h updated: 1.6 -> 1.7
InstrSelectorEmitter.h updated: 1.24 -> 1.25
Record.h updated: 1.42 -> 1.43
---
Log message:
Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++. Patch contributed by Morten Ofstad!
---
Diffs of the changes: (+16 -10)
Index: llvm/utils/TableGen/CodeGenTarget.h
diff -u llvm/utils/TableGen/CodeGenTarget.h:1.14 llvm/utils/TableGen/CodeGenTarget.h:1.15
--- llvm/utils/TableGen/CodeGenTarget.h:1.14 Thu Oct 14 00:50:43 2004
+++ llvm/utils/TableGen/CodeGenTarget.h Wed Oct 27 11:06:27 2004
@@ -26,7 +26,7 @@
class Record;
class RecordKeeper;
-class CodeGenRegister;
+struct CodeGenRegister;
/// getValueType - Return the MVT::ValueType that the specified TableGen record
/// corresponds to.
Index: llvm/utils/TableGen/InstrInfoEmitter.h
diff -u llvm/utils/TableGen/InstrInfoEmitter.h:1.6 llvm/utils/TableGen/InstrInfoEmitter.h:1.7
--- llvm/utils/TableGen/InstrInfoEmitter.h:1.6 Sun Aug 1 00:04:00 2004
+++ llvm/utils/TableGen/InstrInfoEmitter.h Wed Oct 27 11:06:28 2004
@@ -22,7 +22,7 @@
class StringInit;
class IntInit;
class ListInit;
-class CodeGenInstruction;
+struct CodeGenInstruction;
class InstrInfoEmitter : public TableGenBackend {
RecordKeeper &Records;
Index: llvm/utils/TableGen/InstrSelectorEmitter.h
diff -u llvm/utils/TableGen/InstrSelectorEmitter.h:1.24 llvm/utils/TableGen/InstrSelectorEmitter.h:1.25
--- llvm/utils/TableGen/InstrSelectorEmitter.h:1.24 Sat Jul 31 23:04:35 2004
+++ llvm/utils/TableGen/InstrSelectorEmitter.h Wed Oct 27 11:06:28 2004
@@ -24,7 +24,7 @@
namespace llvm {
class DagInit;
-class Init;
+struct Init;
class InstrSelectorEmitter;
/// NodeType - Represents Information parsed from the DagNode entries.
Index: llvm/utils/TableGen/Record.h
diff -u llvm/utils/TableGen/Record.h:1.42 llvm/utils/TableGen/Record.h:1.43
--- llvm/utils/TableGen/Record.h:1.42 Fri Oct 22 23:58:50 2004
+++ llvm/utils/TableGen/Record.h Wed Oct 27 11:06:28 2004
@@ -34,7 +34,7 @@
class RecordRecTy;
// Init subclasses...
-class Init;
+struct Init;
class UnsetInit;
class BitInit;
class BitsInit;
@@ -107,7 +107,8 @@
/// BitRecTy - 'bit' - Represent a single bit
///
-struct BitRecTy : public RecTy {
+class BitRecTy : public RecTy {
+public:
Init *convertValue(UnsetInit *UI) { return (Init*)UI; }
Init *convertValue(BitInit *BI) { return (Init*)BI; }
Init *convertValue(BitsInit *BI);
@@ -157,7 +158,8 @@
/// IntRecTy - 'int' - Represent an integer value of no particular size
///
-struct IntRecTy : public RecTy {
+class IntRecTy : public RecTy {
+public:
Init *convertValue(UnsetInit *UI) { return (Init*)UI; }
Init *convertValue(IntInit *II) { return (Init*)II; }
Init *convertValue(BitInit *BI);
@@ -177,7 +179,8 @@
/// StringRecTy - 'string' - Represent an string value
///
-struct StringRecTy : public RecTy {
+class StringRecTy : public RecTy {
+public:
Init *convertValue(UnsetInit *UI) { return (Init*)UI; }
Init *convertValue(StringInit *SI) { return (Init*)SI; }
Init *convertValue(TypedInit *TI);
@@ -219,7 +222,8 @@
/// CodeRecTy - 'code' - Represent an code fragment, function or method.
///
-struct CodeRecTy : public RecTy {
+class CodeRecTy : public RecTy {
+public:
Init *convertValue(UnsetInit *UI) { return (Init*)UI; }
Init *convertValue( CodeInit *CI) { return (Init*)CI; }
Init *convertValue(TypedInit *TI);
@@ -234,7 +238,8 @@
/// DagRecTy - 'dag' - Represent a dag fragment
///
-struct DagRecTy : public RecTy {
+class DagRecTy : public RecTy {
+public:
Init *convertValue(UnsetInit *UI) { return (Init*)UI; }
Init *convertValue( DagInit *CI) { return (Init*)CI; }
Init *convertValue(TypedInit *TI);
@@ -343,7 +348,8 @@
/// UnsetInit - ? - Represents an uninitialized value
///
-struct UnsetInit : public Init {
+class UnsetInit : public Init {
+public:
virtual Init *convertInitializerTo(RecTy *Ty) {
return Ty->convertValue(this);
}
More information about the llvm-commits
mailing list