summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReader.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2016-03-01 00:49:02 +0000
committerJohn McCall <rjmccall@apple.com>2016-03-01 00:49:02 +0000
commit18afab762a6c22de74f1ef714178fb9d1da159b1 (patch)
tree21e7d816b503992dffbc593f54cca2b040e6bb6f /clang/lib/Serialization/ASTReader.cpp
parent6d0c8a036e1f6eabae4962b711836920f1a354e3 (diff)
downloadbcm5719-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/ASTReader.cpp')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 82bc92c806a..4eef6cfbff4 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -5387,6 +5387,17 @@ QualType ASTReader::readTypeRecord(unsigned Index) {
for (unsigned I = 0; I != NumParams; ++I)
ParamTypes.push_back(readType(*Loc.F, Record, Idx));
+ SmallVector<FunctionProtoType::ExtParameterInfo, 4> ExtParameterInfos;
+ if (Idx != Record.size()) {
+ for (unsigned I = 0; I != NumParams; ++I)
+ ExtParameterInfos.push_back(
+ FunctionProtoType::ExtParameterInfo
+ ::getFromOpaqueValue(Record[Idx++]));
+ EPI.ExtParameterInfos = ExtParameterInfos.data();
+ }
+
+ assert(Idx == Record.size());
+
return Context.getFunctionType(ResultType, ParamTypes, EPI);
}
OpenPOWER on IntegriCloud