aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHReader.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-15 22:00:08 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-15 22:00:08 +0000
commit6d473967121ac70ecede83bb2b47247e9a3766f3 (patch)
treebe00c4d018932768104a213cfba8d1fffe42fa68 /lib/Frontend/PCHReader.cpp
parentc8d2e77288c07a69cabb755a4ab9feeb7b5a1287 (diff)
PCH support for ExtQualType
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69230 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReader.cpp')
-rw-r--r--lib/Frontend/PCHReader.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp
index e5656d63f9..0bd254f1ca 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -1079,10 +1079,20 @@ QualType PCHReader::ReadTypeRecord(uint64_t Offset) {
assert(false && "Should never jump to an attribute block");
return QualType();
- case pch::TYPE_EXT_QUAL:
- // FIXME: Deserialize ExtQualType
- assert(false && "Cannot deserialize qualified types yet");
- return QualType();
+ case pch::TYPE_EXT_QUAL: {
+ assert(Record.size() == 3 &&
+ "Incorrect encoding of extended qualifier type");
+ QualType Base = GetType(Record[0]);
+ QualType::GCAttrTypes GCAttr = (QualType::GCAttrTypes)Record[1];
+ unsigned AddressSpace = Record[2];
+
+ QualType T = Base;
+ if (GCAttr != QualType::GCNone)
+ T = Context.getObjCGCQualType(T, GCAttr);
+ if (AddressSpace)
+ T = Context.getAddrSpaceQualType(T, AddressSpace);
+ return T;
+ }
case pch::TYPE_FIXED_WIDTH_INT: {
assert(Record.size() == 2 && "Incorrect encoding of fixed-width int type");