diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-22 18:11:50 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-22 18:11:50 +0000 |
commit | 9123666ed4ab82182b92f8d978a2801516dcd63d (patch) | |
tree | 06c1b32dc4e67518420a7e77924fb7528b491ed2 /lib/Frontend/PCHReader.cpp | |
parent | b4debaebedfeb3161cd7bce0d13f005ab442fa5e (diff) |
Serialize the NoReturn bit on FunctionTypes for precompiled headers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReader.cpp')
-rw-r--r-- | lib/Frontend/PCHReader.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index 48ef2ac31a..2eabdc93f4 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -1854,17 +1854,18 @@ QualType PCHReader::ReadTypeRecord(uint64_t Offset) { } case pch::TYPE_FUNCTION_NO_PROTO: { - if (Record.size() != 1) { + if (Record.size() != 2) { Error("incorrect encoding of no-proto function type"); return QualType(); } QualType ResultType = GetType(Record[0]); - return Context->getFunctionNoProtoType(ResultType); + return Context->getFunctionNoProtoType(ResultType, Record[1]); } case pch::TYPE_FUNCTION_PROTO: { QualType ResultType = GetType(Record[0]); - unsigned Idx = 1; + bool NoReturn = Record[1]; + unsigned Idx = 2; unsigned NumParams = Record[Idx++]; llvm::SmallVector<QualType, 16> ParamTypes; for (unsigned I = 0; I != NumParams; ++I) @@ -1880,7 +1881,7 @@ QualType PCHReader::ReadTypeRecord(uint64_t Offset) { return Context->getFunctionType(ResultType, ParamTypes.data(), NumParams, isVariadic, Quals, hasExceptionSpec, hasAnyExceptionSpec, NumExceptions, - Exceptions.data()); + Exceptions.data(), NoReturn); } case pch::TYPE_UNRESOLVED_USING: |