diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-04 21:44:47 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-04 21:44:47 +0000 |
commit | 400f5125e2432d648f2c8a31b36a7f318a880c47 (patch) | |
tree | 9907687ed59591454fe3a475cf02325ff33a45dd /lib/Frontend/PCHReader.cpp | |
parent | c91e9f439ae85d5f79a6b65672f1d7d1b55ccda0 (diff) |
Fix a regression of a previous commit of mine (rdar://8158953).
Some of the invariant checks for creating Record/Enum types don't hold true during PCH reading.
Introduce more suitable ASTContext::getRecordType() and getEnumType().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107598 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReader.cpp')
-rw-r--r-- | lib/Frontend/PCHReader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index 27ca86f2f1..aaa80fefaf 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -2149,14 +2149,14 @@ QualType PCHReader::ReadTypeRecord(uint64_t Offset) { Error("incorrect encoding of record type"); return QualType(); } - return Context->getTypeDeclType(cast<RecordDecl>(GetDecl(Record[0]))); + return Context->getRecordType(cast<RecordDecl>(GetDecl(Record[0]))); case pch::TYPE_ENUM: if (Record.size() != 1) { Error("incorrect encoding of enum type"); return QualType(); } - return Context->getTypeDeclType(cast<EnumDecl>(GetDecl(Record[0]))); + return Context->getEnumType(cast<EnumDecl>(GetDecl(Record[0]))); case pch::TYPE_ELABORATED: { unsigned Idx = 0; |