aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHReader.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-01-18 17:14:39 +0000
committerDouglas Gregor <dgregor@apple.com>2010-01-18 17:14:39 +0000
commitab8bbf4ebd3e3e6eab913cb044772a62b7581941 (patch)
tree6a9c15fe9aecee4326568409b43782b770554169 /lib/Frontend/PCHReader.cpp
parent35aa62aacf2b644f2ff2f0bdfd89136323698a39 (diff)
Encoding calling conventions in the type system, from Charles Davis!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReader.cpp')
-rw-r--r--lib/Frontend/PCHReader.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp
index 07d5a78bea..1f23bd2141 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -1909,18 +1909,20 @@ QualType PCHReader::ReadTypeRecord(uint64_t Offset) {
}
case pch::TYPE_FUNCTION_NO_PROTO: {
- if (Record.size() != 2) {
+ if (Record.size() != 3) {
Error("incorrect encoding of no-proto function type");
return QualType();
}
QualType ResultType = GetType(Record[0]);
- return Context->getFunctionNoProtoType(ResultType, Record[1]);
+ return Context->getFunctionNoProtoType(ResultType, Record[1],
+ (CallingConv)Record[2]);
}
case pch::TYPE_FUNCTION_PROTO: {
QualType ResultType = GetType(Record[0]);
bool NoReturn = Record[1];
- unsigned Idx = 2;
+ CallingConv CallConv = (CallingConv)Record[2];
+ unsigned Idx = 3;
unsigned NumParams = Record[Idx++];
llvm::SmallVector<QualType, 16> ParamTypes;
for (unsigned I = 0; I != NumParams; ++I)
@@ -1936,7 +1938,7 @@ QualType PCHReader::ReadTypeRecord(uint64_t Offset) {
return Context->getFunctionType(ResultType, ParamTypes.data(), NumParams,
isVariadic, Quals, hasExceptionSpec,
hasAnyExceptionSpec, NumExceptions,
- Exceptions.data(), NoReturn);
+ Exceptions.data(), NoReturn, CallConv);
}
case pch::TYPE_UNRESOLVED_USING: