diff options
author | John McCall <rjmccall@apple.com> | 2010-10-14 03:00:17 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-10-14 03:00:17 +0000 |
commit | 71c3673d1e3756d8ef3cbc559fcad1d0b2f18a1f (patch) | |
tree | 0361b14b1f37995c6208957ce15639e9bf3c0c03 /lib/AST/Type.cpp | |
parent | 008df5dce3938456ae7ea2e7ab3b2d12391ebf3e (diff) |
Compress bit fields / enums from ReferenceType, BuiltinType, FunctionType, and
ObjCObjectType into Type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116472 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r-- | lib/AST/Type.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 5477a4886d..89c39d8120 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -311,9 +311,9 @@ ObjCObjectType::ObjCObjectType(QualType Canonical, QualType Base, ObjCProtocolDecl * const *Protocols, unsigned NumProtocols) : Type(ObjCObject, Canonical, false, false), - NumProtocols(NumProtocols), BaseType(Base) { - assert(this->NumProtocols == NumProtocols && + SubclassBits = NumProtocols; + assert(getNumProtocols() == NumProtocols && "bitfield overflow in protocol count"); if (NumProtocols) memcpy(getProtocolStorage(), Protocols, @@ -1026,7 +1026,7 @@ void FunctionProtoType::Profile(llvm::FoldingSetNodeID &ID, QualType Result, unsigned TypeQuals, bool hasExceptionSpec, bool anyExceptionSpec, unsigned NumExceptions, exception_iterator Exs, - const FunctionType::ExtInfo &Info) { + FunctionType::ExtInfo Info) { ID.AddPointer(Result.getAsOpaquePtr()); for (unsigned i = 0; i != NumArgs; ++i) ID.AddPointer(ArgTys[i].getAsOpaquePtr()); @@ -1038,9 +1038,7 @@ void FunctionProtoType::Profile(llvm::FoldingSetNodeID &ID, QualType Result, for (unsigned i = 0; i != NumExceptions; ++i) ID.AddPointer(Exs[i].getAsOpaquePtr()); } - ID.AddInteger(Info.getNoReturn()); - ID.AddInteger(Info.getRegParm()); - ID.AddInteger(Info.getCC()); + Info.Profile(ID); } void FunctionProtoType::Profile(llvm::FoldingSetNodeID &ID) { |