diff options
author | John McCall <rjmccall@apple.com> | 2016-03-01 00:49:02 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2016-03-01 00:49:02 +0000 |
commit | 18afab762a6c22de74f1ef714178fb9d1da159b1 (patch) | |
tree | 21e7d816b503992dffbc593f54cca2b040e6bb6f /clang/lib/Serialization/ASTWriter.cpp | |
parent | 6d0c8a036e1f6eabae4962b711836920f1a354e3 (diff) | |
download | bcm5719-llvm-18afab762a6c22de74f1ef714178fb9d1da159b1.tar.gz bcm5719-llvm-18afab762a6c22de74f1ef714178fb9d1da159b1.zip |
Generalize the consumed-parameter array on FunctionProtoType
to allow arbitrary data to be associated with a parameter.
Also, fix a bug where we apparently haven't been serializing
this information for the last N years.
llvm-svn: 262278
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index a88ab5fb5f2..98ed1488d50 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -239,8 +239,14 @@ void ASTTypeWriter::VisitFunctionProtoType(const FunctionProtoType *T) { for (unsigned I = 0, N = T->getNumParams(); I != N; ++I) Writer.AddTypeRef(T->getParamType(I), Record); + if (T->hasExtParameterInfos()) { + for (unsigned I = 0, N = T->getNumParams(); I != N; ++I) + Record.push_back(T->getExtParameterInfo(I).getOpaqueValue()); + } + if (T->isVariadic() || T->hasTrailingReturn() || T->getTypeQuals() || - T->getRefQualifier() || T->getExceptionSpecType() != EST_None) + T->getRefQualifier() || T->getExceptionSpecType() != EST_None || + T->hasExtParameterInfos()) AbbrevToUse = 0; Code = TYPE_FUNCTION_PROTO; |