diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-05-27 22:11:52 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-05-27 22:11:52 +0000 |
commit | 465226e23a3008bd68973513dda1f9e3cd27dbdd (patch) | |
tree | c42f2171260da10cac2a87d0f8bc530feef24d00 /lib/AST/Type.cpp | |
parent | cfcceab862141b7cc3df42ced5f421d76e536a36 (diff) |
Reintroduce the home for exception specs, and make Sema fill it. However, keep the spec out of the canonical type this time. Net effect is currently nothing, because the spec isn't checked anywhere.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72498 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r-- | lib/AST/Type.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 6093352021..c04e8275ef 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -927,17 +927,26 @@ const char *BuiltinType::getName() const { void FunctionProtoType::Profile(llvm::FoldingSetNodeID &ID, QualType Result, arg_type_iterator ArgTys, unsigned NumArgs, bool isVariadic, - unsigned TypeQuals) { + unsigned TypeQuals, bool hasExceptionSpec, + bool anyExceptionSpec, unsigned NumExceptions, + exception_iterator Exs) { ID.AddPointer(Result.getAsOpaquePtr()); for (unsigned i = 0; i != NumArgs; ++i) ID.AddPointer(ArgTys[i].getAsOpaquePtr()); ID.AddInteger(isVariadic); ID.AddInteger(TypeQuals); + ID.AddInteger(hasExceptionSpec); + if (hasExceptionSpec) { + ID.AddInteger(anyExceptionSpec); + for(unsigned i = 0; i != NumExceptions; ++i) + ID.AddPointer(Exs[i].getAsOpaquePtr()); + } } void FunctionProtoType::Profile(llvm::FoldingSetNodeID &ID) { Profile(ID, getResultType(), arg_type_begin(), NumArgs, isVariadic(), - getTypeQuals()); + getTypeQuals(), hasExceptionSpec(), hasAnyExceptionSpec(), + getNumExceptions(), exception_begin()); } void ObjCQualifiedInterfaceType::Profile(llvm::FoldingSetNodeID &ID, |