Convert 'struct' to 'class' in various places to adhere to the coding standards
authorChris Lattner <sabre@nondot.org>
Wed, 27 Oct 2004 16:14:51 +0000 (16:14 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 27 Oct 2004 16:14:51 +0000 (16:14 +0000)
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

35 files changed:
include/llvm/AbstractTypeUser.h
include/llvm/Analysis/AliasSetTracker.h
include/llvm/Analysis/DataStructure/DSNode.h
include/llvm/Analysis/Dominators.h
include/llvm/Analysis/LoopInfo.h
include/llvm/BasicBlock.h
include/llvm/CodeGen/MachineBasicBlock.h
include/llvm/CodeGen/MachineCodeEmitter.h
include/llvm/CodeGen/MachineFunction.h
include/llvm/CodeGen/MachineInstr.h
include/llvm/Instructions.h
include/llvm/Pass.h
include/llvm/Support/Annotation.h
include/llvm/Support/CommandLine.h
include/llvm/Support/DOTGraphTraits.h
include/llvm/System/MappedFile.h
include/llvm/Target/TargetData.h
include/llvm/Target/TargetFrameInfo.h
include/llvm/Target/TargetInstrInfo.h
include/llvm/Target/TargetSchedInfo.h
include/llvm/Transforms/Utils/FunctionUtils.h
include/llvm/Transforms/Utils/PromoteMemToReg.h
include/llvm/Use.h
include/llvm/Value.h
lib/Analysis/InstCount.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/TransformInternals.h
lib/VMCore/ConstantFold.h
lib/VMCore/ConstantFolding.h
lib/VMCore/PassManagerT.h
utils/TableGen/CodeGenTarget.h
utils/TableGen/InstrInfoEmitter.h
utils/TableGen/InstrSelectorEmitter.h
utils/TableGen/Record.h

index 26620eb85f57a03952f4209b5459b67efde441e6..71a532ef97b6c0072ba19bebbc021bd24cc53602 100644 (file)
@@ -39,7 +39,7 @@
 
 namespace llvm {
 
-struct Type;
+class Type;
 class DerivedType;
 
 class AbstractTypeUser {
index fe3e60c62bbd615837ed238441b8e5650f02e14e..91c822b50316f44765d82d4d195937165f16a587 100644 (file)
@@ -34,7 +34,7 @@ class AliasSet;
 class AliasSet {
   friend class AliasSetTracker;
 
-  struct PointerRec;
+  class PointerRec;
   typedef std::pair<Value* const, PointerRec> HashNodePair;
 
   class PointerRec {
@@ -116,7 +116,7 @@ class AliasSet {
   // Volatile - True if this alias set contains volatile loads or stores.
   bool Volatile : 1;
 
-  friend class ilist_traits<AliasSet>;
+  friend struct ilist_traits<AliasSet>;
   AliasSet *getPrev() const { return Prev; }
   AliasSet *getNext() const { return Next; }
   void setPrev(AliasSet *P) { Prev = P; }
index 27ae67ee1dd22b035c608376fdf6116bcc5f9ba3..3cdc0a6420e6e7ab939866b73532deef72db6bf4 100644 (file)
@@ -47,7 +47,7 @@ class DSNode {
   /// doubly-linked ilist in the DSGraph.
   ///
   DSNode *Next, *Prev;
-  friend class ilist_traits<DSNode>;
+  friend struct ilist_traits<DSNode>;
 
   /// Size - The current size of the node.  This should be equal to the size of
   /// the current type record.
index 11d4b98cdd896ee31b2474767a846db27ba9deb7..c1cdae50f2352e3c46fe56f90ea4438b4604d18a 100644 (file)
@@ -287,9 +287,9 @@ protected:
   Node *RootNode;
 public:
   class Node {
-    friend class DominatorTree;
-    friend class PostDominatorTree;
-    friend class DominatorTreeBase;
+    friend struct DominatorTree;
+    friend struct PostDominatorTree;
+    friend struct DominatorTreeBase;
     BasicBlock *TheBB;
     Node *IDom;
     std::vector<Node*> Children;
index c5eec83428772d1d830becba6e71cdfd4b6c97b6..32351ea55ce70d35104c5cde3d7acb8973231cfc 100644 (file)
@@ -35,7 +35,7 @@
 
 namespace llvm {
 
-class DominatorSet;
+struct DominatorSet;
 class LoopInfo;
 class PHINode;
 class Instruction;
index 2a18ba837ed30e14befe9eb6ee9db21dde7c5f30..0ede5f3072a2cff75c1d2ff3c6e0874b4601a815 100644 (file)
@@ -45,7 +45,8 @@ template<> struct ilist_traits<Instruction>
   static iplist<Instruction> &getList(BasicBlock *BB);
 };
 
-struct BasicBlock : public Value {       // Basic blocks are data objects also
+class BasicBlock : public Value {       // Basic blocks are data objects also
+public:
   typedef iplist<Instruction> InstListType;
 private :
   InstListType InstList;
index 62a6e802088caadbfacb1603d74bd11b6536b989..a7d031bad4b2c8e88564151a8c74455613220ddf 100644 (file)
@@ -24,7 +24,8 @@ namespace llvm {
 
 // ilist_traits
 template <>
-class ilist_traits<MachineInstr> {
+struct ilist_traits<MachineInstr> {
+protected:
   // this is only set by the MachineBasicBlock owning the ilist
   friend class MachineBasicBlock;
   MachineBasicBlock* parent;
@@ -179,7 +180,7 @@ public:
   int getNumber() const { return Number; }
 
 private:   // Methods used to maintain doubly linked list of blocks...
-  friend class ilist_traits<MachineBasicBlock>;
+  friend struct ilist_traits<MachineBasicBlock>;
 
   MachineBasicBlock *getPrev() const { return Prev; }
   MachineBasicBlock *getNext() const { return Next; }
index 0daab91faf7691a4987ea1b8b7b8c5226e3547f0..dc7aa5e09cb8c1a64ffb58563f2aa087ec60650b 100644 (file)
@@ -29,7 +29,8 @@ class Value;
 class GlobalValue;
 class Function;
 
-struct MachineCodeEmitter {
+class MachineCodeEmitter {
+public:
   virtual ~MachineCodeEmitter() {}
 
   /// startFunction - This callback is invoked when the specified function is
index 72feda4eb18ce93bed50374adcd67e423bbdbbb2..e6d9eb1bf814d6571de16af2d52b5d0287d327f9 100644 (file)
@@ -31,7 +31,7 @@ class MachineConstantPool;
 
 // ilist_traits
 template <>
-class ilist_traits<MachineBasicBlock> {
+struct ilist_traits<MachineBasicBlock> {
   // this is only set by the MachineFunction owning the ilist
   friend class MachineFunction;
   MachineFunction* Parent;
index d9a865e0a696feed89f210f0c106e4535a5affe5..6227490706dddeb475b3fe97bb0d0ca606026671 100644 (file)
@@ -29,8 +29,8 @@ class MachineBasicBlock;
 class TargetMachine;
 class GlobalValue;
 
-template <typename T> class ilist_traits;
-template <typename T> class ilist;
+template <typename T> struct ilist_traits;
+template <typename T> struct ilist;
 
 typedef short MachineOpCode;
 
@@ -417,7 +417,7 @@ class MachineInstr {
 
   // Intrusive list support
   //
-  friend class ilist_traits<MachineInstr>;
+  friend struct ilist_traits<MachineInstr>;
 
 public:
   MachineInstr(short Opcode, unsigned numOperands);
index 96772edd7691f1c7df2b3fe4c5243b8ea702d5e5..5ba361b6465684c06f3292bc68b4c3676efa6d91 100644 (file)
@@ -21,7 +21,7 @@
 
 namespace llvm {
 
-struct BasicBlock;
+class BasicBlock;
 class PointerType;
 
 //===----------------------------------------------------------------------===//
@@ -1159,7 +1159,8 @@ public:
 /// UnwindInst - Immediately exit the current function, unwinding the stack
 /// until an invoke instruction is found.
 ///
-struct UnwindInst : public TerminatorInst {
+class UnwindInst : public TerminatorInst {
+public:
   UnwindInst(Instruction *InsertBefore = 0)
     : TerminatorInst(Instruction::Unwind, InsertBefore) {
   }
@@ -1196,7 +1197,8 @@ struct UnwindInst : public TerminatorInst {
 /// presence of this instruction indicates some higher level knowledge that the
 /// end of the block cannot be reached.
 ///
-struct UnreachableInst : public TerminatorInst {
+class UnreachableInst : public TerminatorInst {
+public:
   UnreachableInst(Instruction *InsertBefore = 0)
     : TerminatorInst(Instruction::Unreachable, InsertBefore) {
   }
index 77f630c31641c3855d1f770a39ba123762ae5f21..ff710d37664ea909c50741e198cfdd19c3ea3cea 100644 (file)
@@ -38,7 +38,7 @@
 namespace llvm {
 
 class Value;
-struct BasicBlock;
+class BasicBlock;
 class Function;
 class Module;
 class AnalysisUsage;
@@ -56,7 +56,7 @@ typedef const PassInfo* AnalysisID;
 /// constrained passes described below.
 ///
 class Pass {
-  friend class AnalysisResolver;
+  friend struct AnalysisResolver;
   AnalysisResolver *Resolver;  // AnalysisResolver this pass is owned by...
   const PassInfo *PassInfoCache;
 
@@ -211,8 +211,8 @@ inline std::ostream &operator<<(std::ostream &OS, const Pass &P) {
 /// interprocedural optimizations and analyses.  ModulePass's may do anything
 /// they want to the program.
 ///
-struct ModulePass : public Pass {
-
+class ModulePass : public Pass {
+public:
   /// runOnModule - Virtual method overriden by subclasses to process the module
   /// being operated on.
   virtual bool runOnModule(Module &M) = 0;
@@ -228,7 +228,8 @@ struct ModulePass : public Pass {
 /// not need to be run.  This is useful for things like target information and
 /// "basic" versions of AnalysisGroups.
 ///
-struct ImmutablePass : public ModulePass {
+class ImmutablePass : public ModulePass {
+public:
   /// initializePass - This method may be overriden by immutable passes to allow
   /// them to perform various initialization actions they require.  This is
   /// primarily because an ImmutablePass can "require" another ImmutablePass,
@@ -255,7 +256,8 @@ private:
 ///  2. Optimizing a function does not cause the addition or removal of any
 ///     functions in the module
 ///
-struct FunctionPass : public ModulePass {
+class FunctionPass : public ModulePass {
+public:
   /// doInitialization - Virtual method overridden by subclasses to do
   /// any necessary per-module initialization.
   ///
index 4325836c29083526b0ed36d86589adfa1d73269e..2331ca5a239719a0204b5deb4439abd6db06aeb6 100644 (file)
@@ -30,7 +30,7 @@ namespace llvm {
 class AnnotationID;
 class Annotation;
 class Annotable;
-class AnnotationManager;
+struct AnnotationManager;
 
 //===----------------------------------------------------------------------===//
 //
@@ -39,7 +39,7 @@ class AnnotationManager;
 // freely around and passed byvalue with little or no overhead.
 //
 class AnnotationID {
-  friend class AnnotationManager;
+  friend struct AnnotationManager;
   unsigned ID;
 
   AnnotationID();                             // Default ctor is disabled
index 2c38e0aac0659cb99363d894003252799a12187b..4bb1c1f4ee851fb8e7495bd99407fc844276a9f6 100644 (file)
@@ -513,8 +513,8 @@ struct basic_parser : public basic_parser_impl {
 // parser<bool>
 //
 template<>
-struct parser<bool> : public basic_parser<bool> {
-
+class parser<bool> : public basic_parser<bool> {
+public:
   // parse - Return true on error.
   bool parse(Option &O, const char *ArgName, const std::string &Arg, bool &Val);
 
@@ -531,8 +531,8 @@ struct parser<bool> : public basic_parser<bool> {
 // parser<int>
 //
 template<>
-struct parser<int> : public basic_parser<int> {
-  
+class parser<int> : public basic_parser<int> {
+public:
   // parse - Return true on error.
   bool parse(Option &O, const char *ArgName, const std::string &Arg, int &Val);
 
@@ -545,8 +545,8 @@ struct parser<int> : public basic_parser<int> {
 // parser<unsigned>
 //
 template<>
-struct parser<unsigned> : public basic_parser<unsigned> {
-  
+class parser<unsigned> : public basic_parser<unsigned> {
+public:
   // parse - Return true on error.
   bool parse(Option &O, const char *AN, const std::string &Arg, unsigned &Val);
 
@@ -559,7 +559,8 @@ struct parser<unsigned> : public basic_parser<unsigned> {
 // parser<double>
 //
 template<>
-struct parser<double> : public basic_parser<double> {
+class parser<double> : public basic_parser<double> {
+public:
   // parse - Return true on error.
   bool parse(Option &O, const char *AN, const std::string &Arg, double &Val);
 
@@ -572,7 +573,8 @@ struct parser<double> : public basic_parser<double> {
 // parser<float>
 //
 template<>
-struct parser<float> : public basic_parser<float> {
+class parser<float> : public basic_parser<float> {
+public:
   // parse - Return true on error.
   bool parse(Option &O, const char *AN, const std::string &Arg, float &Val);
 
@@ -585,7 +587,8 @@ struct parser<float> : public basic_parser<float> {
 // parser<std::string>
 //
 template<>
-struct parser<std::string> : public basic_parser<std::string> {
+class parser<std::string> : public basic_parser<std::string> {
+public:
   // parse - Return true on error.
   bool parse(Option &O, const char *AN, const std::string &Arg, 
              std::string &Value) {
@@ -687,8 +690,8 @@ public:
 // object in all cases that it is used.
 //
 template<class DataType>
-struct opt_storage<DataType,false,true> : public DataType {
-
+class opt_storage<DataType,false,true> : public DataType {
+public:
   template<class T>
   void setValue(const T &V) { DataType::operator=(V); }
 
@@ -701,7 +704,8 @@ struct opt_storage<DataType,false,true> : public DataType {
 // to get at the value.
 //
 template<class DataType>
-struct opt_storage<DataType, false, false> {
+class opt_storage<DataType, false, false> {
+public:
   DataType Value;
 
   // Make sure we initialize the value with the default constructor for the
@@ -864,8 +868,8 @@ public:
 // object in all cases that it is used.
 //
 template<class DataType>
-struct list_storage<DataType, bool> : public std::vector<DataType> {
-
+class list_storage<DataType, bool> : public std::vector<DataType> {
+public:
   template<class T>
   void addValue(const T &V) { push_back(V); }
 };
index b83b759f40739b0542a748c389a0d8b87bed8852..7196e51f8cbcdad05f293e39b235e62162391cfc 100644 (file)
@@ -95,7 +95,7 @@ struct DefaultDOTGraphTraits {
 /// from DefaultDOTGraphTraits if you don't need to override everything.
 ///
 template <typename Ty>
-class DOTGraphTraits : public DefaultDOTGraphTraits {};
+struct DOTGraphTraits : public DefaultDOTGraphTraits {};
 
 } // End llvm namespace
 
index f6b656c7bab19d474dd742cfef35bc6f3d908c77..0a3f21b67fbda08a94ae0556d5ffb1c822b0a561 100644 (file)
@@ -21,7 +21,7 @@ namespace sys {
 
   /// Forward declare a class used for holding platform specific information
   /// that needs to be 
-  class MappedFileInfo;
+  struct MappedFileInfo;
 
   /// This class provides an abstraction for a memory mapped file in the 
   /// operating system's filesystem. It provides platform independent operations
index 9de9d7044a8ca3dc805c451344dcd2142352c3fb..3879b74c7e5e9fe7ea2ee2e7e87e6721e4771c0f 100644 (file)
@@ -114,7 +114,8 @@ public:
 // This object is used to lazily calculate structure layout information for a
 // target machine, based on the TargetData structure.
 //
-struct StructLayout {
+class StructLayout {
+public:
   std::vector<uint64_t> MemberOffsets;
   uint64_t StructSize;
   unsigned StructAlignment;
index dfdca8dab7710af0dea900fbe13cfc88ce4857cb..bbaeafdcdfcbe8ccb3486e34950bfc10ade3848a 100644 (file)
@@ -27,7 +27,8 @@ class MachineFunction;
 /// The offset to the local area is the offset from the stack pointer on
 /// function entry to the first location where function data (local variables,
 /// spill locations) can be stored.
-struct TargetFrameInfo {
+class TargetFrameInfo {
+public:
   enum StackDirection {
     StackGrowsUp,        // Adding to the stack increases the stack address
     StackGrowsDown       // Adding to the stack decreases the stack address
index 603bf67a4d101ffbb1ac40ba5b7493c18010e0c0..7fddde5a1dd58ba802570843e70aafb30565d3fa 100644 (file)
@@ -61,7 +61,8 @@ const unsigned M_2_ADDR_FLAG           = 1 << 15;
 // before control flow occurs.
 const unsigned M_TERMINATOR_FLAG       = 1 << 16;
 
-struct TargetInstrDescriptor {
+class TargetInstrDescriptor {
+public:
   const char *    Name;          // Assembly language mnemonic for the opcode.
   int             numOperands;   // Number of args; -1 if variable #args
   int             resultPos;     // Position of the result; -1 if no result
index 8a904d99bccaec986d99697089510d7d08e9cee9..9a4497f9c299771b78049388c7fd496a3908488c 100644 (file)
@@ -152,7 +152,8 @@ private:
 /// TargetSchedInfo - Common interface to machine information for 
 /// instruction scheduling
 ///
-struct TargetSchedInfo {
+class TargetSchedInfo {
+public:
   const TargetMachine& target;
   
   unsigned maxNumIssueTotal;
index 9c2f2098c153c44f017a1bfca607a8f19eb42895..d0e9cbc63e867ea7d2d5a70acfbd3a4f3d30f3a9 100644 (file)
@@ -18,7 +18,7 @@
 
 namespace llvm {
   class BasicBlock;
-  class DominatorSet;
+  struct DominatorSet;
   class Function;
   class Loop;
   
index f6c3a8fce0c51f16d9e3d325f6a6669073cb5f97..12e7fb125794624673307d2dcf8c32e7cc0dd506 100644 (file)
@@ -20,8 +20,8 @@
 namespace llvm {
 
 class AllocaInst;
-class DominatorTree;
-class DominanceFrontier;
+struct DominatorTree;
+struct DominanceFrontier;
 class TargetData;
 class AliasSetTracker;
 
index 03afc24580f8e522bc197d0a5fa4b532c3abbf60..88b723bfc3a61ab16dde0490d08404fac6972a81 100644 (file)
@@ -35,7 +35,7 @@ class Use {
   Value *Val;
   User *U;
   Use *Prev, *Next;
-  friend class ilist_traits<Use>;
+  friend struct ilist_traits<Use>;
 public:
   inline Use(Value *v, User *user);
   inline Use(const Use &u);
index 884b265dc1615604da1057d1257ebce0fcdc6b6f..ab1707884f0bae433c2cdd257822c74d505c3382 100644 (file)
@@ -27,7 +27,7 @@ namespace llvm {
 class Constant;
 class Argument;
 class Instruction;
-struct BasicBlock;
+class BasicBlock;
 class GlobalValue;
 class Function;
 class GlobalVariable;
index 12d16b081e7b3db6b4b383e92f1e14405c3b054e..96c255ba31147127a79b88b7b291c186cd93a15f 100644 (file)
@@ -29,7 +29,7 @@ namespace {
 #include "llvm/Instruction.def"
 
   class InstCount : public FunctionPass, public InstVisitor<InstCount> {
-    friend class InstVisitor<InstCount>;
+    friend struct InstVisitor<InstCount>;
 
     void visitFunction  (Function &F) { ++TotalFuncs; }
     void visitBasicBlock(BasicBlock &BB) { ++TotalBlocks; }
index 00249807cacdb0b792ca1b1fcf51656241067b96..7ad8ef403c85fe2ade0d7c005a0fedef1995a48c 100644 (file)
@@ -66,7 +66,7 @@ namespace {
 
     Instruction *InsertPt;
 
-    friend class SCEVVisitor<SCEVExpander, Value*>;
+    friend struct SCEVVisitor<SCEVExpander, Value*>;
   public:
     SCEVExpander(ScalarEvolution &se, LoopInfo &li) : SE(se), LI(li) {}
 
index aa57159b6e35148f08c60ef8f5651a641bc96a20..82d00b472ad49ff5df9443d79f49d7210a030be2 100644 (file)
@@ -135,7 +135,7 @@ public:
   // The implementation of this class
   //
 private:
-  friend class InstVisitor<SCCP>;        // Allow callbacks from visitor
+  friend struct InstVisitor<SCCP>;        // Allow callbacks from visitor
 
   // markConstant - Make a value be marked as "constant".  If the value
   // is not already a constant, add it to the instruction work list so that 
index 3b80146a2780c14b28215ca642bd3d8a04952ab6..b5747c91303fd7b1c95bb2be42258879f59ac0de 100644 (file)
@@ -90,7 +90,8 @@ public:
 
 typedef std::map<const Value*, const Type*> ValueTypeCache;
 
-struct ValueMapCache {
+class ValueMapCache {
+public:
   // Operands mapped - Contains an entry if the first value (the user) has had
   // the second value (the operand) mapped already.
   //
index 676b4b8cd8314af4dc3a17ad7eb6f6955206baa6..84e358c5dffb3f775092c47cf92b5b5bcf6fa466 100644 (file)
@@ -24,7 +24,7 @@
 namespace llvm {
   class Value;
   class Constant;
-  struct Type;
+  class Type;
   
   // Constant fold various types of instruction...
   Constant *ConstantFoldCastInstruction(const Constant *V, const Type *DestTy);
index 676b4b8cd8314af4dc3a17ad7eb6f6955206baa6..84e358c5dffb3f775092c47cf92b5b5bcf6fa466 100644 (file)
@@ -24,7 +24,7 @@
 namespace llvm {
   class Value;
   class Constant;
-  struct Type;
+  class Type;
   
   // Constant fold various types of instruction...
   Constant *ConstantFoldCastInstruction(const Constant *V, const Type *DestTy);
index 1d8267fe4e71cea48b73debcc1a3b767cd03b830..8de22d43cc5d901977439f874b7332233f282195 100644 (file)
@@ -630,7 +630,8 @@ public:
 // This pass manager is used to group together all of the BasicBlockPass's
 // into a single unit.
 //
-template<> struct PassManagerTraits<BasicBlock> : public BasicBlockPass {
+template<> class PassManagerTraits<BasicBlock> : public BasicBlockPass {
+public:
   // PassClass - The type of passes tracked by this PassManager
   typedef BasicBlockPass PassClass;
 
@@ -683,7 +684,8 @@ template<> struct PassManagerTraits<BasicBlock> : public BasicBlockPass {
 // This pass manager is used to group together all of the FunctionPass's
 // into a single unit.
 //
-template<> struct PassManagerTraits<Function> : public FunctionPass {
+template<> class PassManagerTraits<Function> : public FunctionPass {
+public:
   // PassClass - The type of passes tracked by this PassManager
   typedef FunctionPass PassClass;
 
@@ -726,7 +728,8 @@ template<> struct PassManagerTraits<Function> : public FunctionPass {
 //
 // This is the top level PassManager implementation that holds generic passes.
 //
-template<> struct PassManagerTraits<Module> : public ModulePass {
+template<> class PassManagerTraits<Module> : public ModulePass {
+public:
   // PassClass - The type of passes tracked by this PassManager
   typedef ModulePass PassClass;
 
index d74e8872a3ed323649dbdb8284d26428b8437bad..ac5306e4efbe5da8db38d8b9f9dccc035ba2c96e 100644 (file)
@@ -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.
index 87a140b43aaa6cdb6e92512282645f30dbc8984f..bf7da347ed2bc16f4723e09b1ee3870ffabd3e64 100644 (file)
@@ -22,7 +22,7 @@ namespace llvm {
 class StringInit;
 class IntInit;
 class ListInit;
-class CodeGenInstruction;
+struct CodeGenInstruction;
 
 class InstrInfoEmitter : public TableGenBackend {
   RecordKeeper &Records;
index 156e7222b7680a058af4f9fcf5e52e8188734f00..302a98adc3c683e5dd3fd5ba1ad681d5166d7f2c 100644 (file)
@@ -24,7 +24,7 @@
 namespace llvm {
 
 class DagInit;
-class Init;
+struct Init;
 class InstrSelectorEmitter;
 
 /// NodeType - Represents Information parsed from the DagNode entries.
index e88497f3120ef0942e939f42a10e2eb2996d35bd..9bd8708e431e1247c249b65f31552b70a0d79bb8 100644 (file)
@@ -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);
   }