diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-05-12 00:27:13 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-05-12 00:27:13 +0000 |
commit | 0b3707c66993e57868b5480e79a9e0707c987dc0 (patch) | |
tree | 281a963bdb4b0a665f48ad990d0330698436798c /lib | |
parent | 8d02531001c4e1a90809e0a086fb5d2c79028a04 (diff) |
Merging r155289:
------------------------------------------------------------------------
r155289 | rsmith | 2012-04-21 10:47:47 -0700 (Sat, 21 Apr 2012) | 3 lines
Fix serialization of uninstantiated exception specifications. Patch by Li Kan,
test by me.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 3 | ||||
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 06b42f3ab1..fd0c171394 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -3866,6 +3866,9 @@ QualType ASTReader::readTypeRecord(unsigned Index) { EPI.Exceptions = Exceptions.data(); } else if (EST == EST_ComputedNoexcept) { EPI.NoexceptExpr = ReadExpr(*Loc.F); + } else if (EST == EST_Uninstantiated) { + EPI.ExceptionSpecDecl = ReadDeclAs<FunctionDecl>(*Loc.F, Record, Idx); + EPI.ExceptionSpecTemplate = ReadDeclAs<FunctionDecl>(*Loc.F, Record, Idx); } return Context.getFunctionType(ResultType, ParamTypes.data(), NumParams, EPI); diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index 81c0a9dd48..36933a9d9b 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -195,6 +195,9 @@ void ASTTypeWriter::VisitFunctionProtoType(const FunctionProtoType *T) { Writer.AddTypeRef(T->getExceptionType(I), Record); } else if (T->getExceptionSpecType() == EST_ComputedNoexcept) { Writer.AddStmt(T->getNoexceptExpr()); + } else if (T->getExceptionSpecType() == EST_Uninstantiated) { + Writer.AddDeclRef(T->getExceptionSpecDecl(), Record); + Writer.AddDeclRef(T->getExceptionSpecTemplate(), Record); } Code = TYPE_FUNCTION_PROTO; } |