aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Type.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-08-13 23:27:32 +0000
committerOwen Anderson <resistor@mac.com>2009-08-13 23:27:32 +0000
commit0e275dc53880a7f14f8b8c83cc6e0290a215492d (patch)
tree08ea0f696cb049a03061301387fce33e4ee18226 /include/llvm/Type.h
parentec9b26100e06d566ccb4516c6fe3f2a685ecd941 (diff)
downloadexternal_llvm-0e275dc53880a7f14f8b8c83cc6e0290a215492d.zip
external_llvm-0e275dc53880a7f14f8b8c83cc6e0290a215492d.tar.gz
external_llvm-0e275dc53880a7f14f8b8c83cc6e0290a215492d.tar.bz2
Actually privatize a IntegerTypes, and fix a few bugs exposed by this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78955 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Type.h')
-rw-r--r--include/llvm/Type.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Type.h b/include/llvm/Type.h
index 05a4e26..b751632 100644
--- a/include/llvm/Type.h
+++ b/include/llvm/Type.h
@@ -109,6 +109,7 @@ private:
/// Context - This refers to the LLVMContext in which this type was uniqued.
LLVMContext &Context;
+ friend class LLVMContextImpl;
const Type *getForwardedTypeInternal() const;
@@ -117,8 +118,9 @@ private:
void destroy() const; // const is a lie, this does "delete this"!
protected:
- explicit Type(TypeID id) : ID(id), Abstract(false), SubclassData(0),
- RefCount(0), Context(getGlobalContext()),
+ explicit Type(LLVMContext &C, TypeID id) :
+ ID(id), Abstract(false), SubclassData(0),
+ RefCount(0), Context(C),
ForwardType(0), NumContainedTys(0),
ContainedTys(0) {}
virtual ~Type() {