diff options
author | Chris Lattner <sabre@nondot.org> | 2003-09-05 02:30:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-09-05 02:30:18 +0000 |
commit | b1678c61326feeb17712c4a0a5e68a382795ca6b (patch) | |
tree | 8652478ea240d9676aa536e82083a1a8a02917f0 /include | |
parent | 169726b1138ce2e8a4cbccac87fe7b5969831e9f (diff) | |
download | external_llvm-b1678c61326feeb17712c4a0a5e68a382795ca6b.zip external_llvm-b1678c61326feeb17712c4a0a5e68a382795ca6b.tar.gz external_llvm-b1678c61326feeb17712c4a0a5e68a382795ca6b.tar.bz2 |
Get friendly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/DerivedTypes.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index f827753..39a87b8 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -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 @@ public: struct FunctionType : public DerivedType { typedef std::vector<PATypeHandle> ParamTypes; + friend class TypeMap<FunctionValType, FunctionType>; private: PATypeHandle ResultType; ParamTypes ParamTys; @@ -186,8 +193,8 @@ public: }; -class StructType : public CompositeType { -public: +struct StructType : public CompositeType { + friend class TypeMap<StructValType, StructType>; typedef std::vector<PATypeHandle> ElementTypes; private: @@ -300,6 +307,7 @@ public: class ArrayType : public SequentialType { + friend class TypeMap<ArrayValType, ArrayType>; unsigned NumElements; ArrayType(const ArrayType &); // Do not implement @@ -342,6 +350,7 @@ public: class PointerType : public SequentialType { + friend class TypeMap<PointerValType, PointerType>; PointerType(const PointerType &); // Do not implement const PointerType &operator=(const PointerType &); // Do not implement protected: |