diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-10-27 16:14:51 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-10-27 16:14:51 +0000 |
| commit | 1fca5ff62bb2ecb5bfc8974f4dbfc56e9d3ca721 (patch) | |
| tree | 84ba84e29d790774dd87ad9efc8acb702dafc842 /utils/TableGen | |
| parent | 3acd9181df5d8f76f75a384266e2a78b9a6c4f45 (diff) | |
| download | llvm-1fca5ff62bb2ecb5bfc8974f4dbfc56e9d3ca721.tar.gz llvm-1fca5ff62bb2ecb5bfc8974f4dbfc56e9d3ca721.tar.bz2 llvm-1fca5ff62bb2ecb5bfc8974f4dbfc56e9d3ca721.tar.xz | |
Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++. Patch contributed by Morten Ofstad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
| -rw-r--r-- | utils/TableGen/CodeGenTarget.h | 2 | ||||
| -rw-r--r-- | utils/TableGen/InstrInfoEmitter.h | 2 | ||||
| -rw-r--r-- | utils/TableGen/InstrSelectorEmitter.h | 2 | ||||
| -rw-r--r-- | utils/TableGen/Record.h | 20 |
4 files changed, 16 insertions, 10 deletions
diff --git a/utils/TableGen/CodeGenTarget.h b/utils/TableGen/CodeGenTarget.h index d74e8872a3..ac5306e4ef 100644 --- a/utils/TableGen/CodeGenTarget.h +++ b/utils/TableGen/CodeGenTarget.h @@ -26,7 +26,7 @@ namespace llvm { class Record; class RecordKeeper; -class CodeGenRegister; +struct CodeGenRegister; /// getValueType - Return the MVT::ValueType that the specified TableGen record /// corresponds to. diff --git a/utils/TableGen/InstrInfoEmitter.h b/utils/TableGen/InstrInfoEmitter.h index 87a140b43a..bf7da347ed 100644 --- a/utils/TableGen/InstrInfoEmitter.h +++ b/utils/TableGen/InstrInfoEmitter.h @@ -22,7 +22,7 @@ namespace llvm { class StringInit; class IntInit; class ListInit; -class CodeGenInstruction; +struct CodeGenInstruction; class InstrInfoEmitter : public TableGenBackend { RecordKeeper &Records; diff --git a/utils/TableGen/InstrSelectorEmitter.h b/utils/TableGen/InstrSelectorEmitter.h index 156e7222b7..302a98adc3 100644 --- a/utils/TableGen/InstrSelectorEmitter.h +++ b/utils/TableGen/InstrSelectorEmitter.h @@ -24,7 +24,7 @@ namespace llvm { class DagInit; -class Init; +struct Init; class InstrSelectorEmitter; /// NodeType - Represents Information parsed from the DagNode entries. diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h index e88497f312..9bd8708e43 100644 --- a/utils/TableGen/Record.h +++ b/utils/TableGen/Record.h @@ -34,7 +34,7 @@ class DagRecTy; class RecordRecTy; // Init subclasses... -class Init; +struct Init; class UnsetInit; class BitInit; class BitsInit; @@ -107,7 +107,8 @@ inline std::ostream &operator<<(std::ostream &OS, const RecTy &Ty) { /// 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 @@ public: /// 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 @@ struct IntRecTy : public RecTy { /// 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 @@ public: /// 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 @@ struct CodeRecTy : public RecTy { /// 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 @@ inline std::ostream &operator<<(std::ostream &OS, const Init &I) { /// UnsetInit - ? - Represents an uninitialized value /// -struct UnsetInit : public Init { +class UnsetInit : public Init { +public: virtual Init *convertInitializerTo(RecTy *Ty) { return Ty->convertValue(this); } |
