[llvm-commits] CVS: llvm/include/llvm/DerivedTypes.h

Chris Lattner lattner at cs.uiuc.edu
Thu Sep 4 21:31:01 PDT 2003


Changes in directory llvm/include/llvm:

DerivedTypes.h updated: 1.37 -> 1.38

---
Log message:

Get friendly


---
Diffs of the changes:

Index: llvm/include/llvm/DerivedTypes.h
diff -u llvm/include/llvm/DerivedTypes.h:1.37 llvm/include/llvm/DerivedTypes.h:1.38
--- llvm/include/llvm/DerivedTypes.h:1.37	Thu Sep  4 21:15:36 2003
+++ llvm/include/llvm/DerivedTypes.h	Thu Sep  4 21:30:18 2003
@@ -13,6 +13,12 @@
 
 #include "llvm/Type.h"
 
+template<class ValType, class TypeClass> class TypeMap;
+class FunctionValType;
+class ArrayValType;
+class StructValType;
+class PointerValType;
+
 class DerivedType : public Type {
   char isRefining;                                   // Used for recursive types
 
@@ -89,6 +95,7 @@
 
 struct FunctionType : public DerivedType {
   typedef std::vector<PATypeHandle> ParamTypes;
+  friend class TypeMap<FunctionValType, FunctionType>;
 private:
   PATypeHandle ResultType;
   ParamTypes ParamTys;
@@ -186,8 +193,8 @@
 };
 
 
-class StructType : public CompositeType {
-public:
+struct StructType : public CompositeType {
+  friend class TypeMap<StructValType, StructType>;
   typedef std::vector<PATypeHandle> ElementTypes;
 
 private:
@@ -300,6 +307,7 @@
 
 
 class ArrayType : public SequentialType {
+  friend class TypeMap<ArrayValType, ArrayType>;
   unsigned NumElements;
 
   ArrayType(const ArrayType &);                   // Do not implement
@@ -342,6 +350,7 @@
 
 
 class PointerType : public SequentialType {
+  friend class TypeMap<PointerValType, PointerType>;
   PointerType(const PointerType &);                   // Do not implement
   const PointerType &operator=(const PointerType &);  // Do not implement
 protected:





More information about the llvm-commits mailing list