diff options
author | John McCall <rjmccall@apple.com> | 2009-09-05 00:15:47 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-09-05 00:15:47 +0000 |
commit | fcc33b074b532adf79dd083cec917d583748aeec (patch) | |
tree | 92c39575bf92ea7881b7a571b13404f1d783aae8 /clang/lib/Frontend/PCHReader.cpp | |
parent | f5d5360065bc89d92a1a35790c38256904717469 (diff) | |
download | bcm5719-llvm-fcc33b074b532adf79dd083cec917d583748aeec.tar.gz bcm5719-llvm-fcc33b074b532adf79dd083cec917d583748aeec.zip |
Basic support for representing elaborated type specifiers
directly in the AST. The current thinking is to create these
only in C++ mode for efficiency. But for now, they're not being
created at all; patch to follow.
This will let us do things like verify that tags match during
template instantation, as well as signal that an elaborated type
specifier was used for clients that actually care.
Optimally, the TypeLoc hierarchy should be adjusted to carry tag
location information as well.
llvm-svn: 81057
Diffstat (limited to 'clang/lib/Frontend/PCHReader.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHReader.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp index 4fcf026549b..a7e6c0c8f9e 100644 --- a/clang/lib/Frontend/PCHReader.cpp +++ b/clang/lib/Frontend/PCHReader.cpp @@ -1941,6 +1941,13 @@ QualType PCHReader::ReadTypeRecord(uint64_t Offset) { assert(Record.size() == 1 && "incorrect encoding of enum type"); return Context->getTypeDeclType(cast<EnumDecl>(GetDecl(Record[0]))); + case pch::TYPE_ELABORATED: { + assert(Record.size() == 2 && "incorrect encoding of elaborated type"); + unsigned Tag = Record[1]; + return Context->getElaboratedType(GetType(Record[0]), + (ElaboratedType::TagKind) Tag); + } + case pch::TYPE_OBJC_INTERFACE: { unsigned Idx = 0; ObjCInterfaceDecl *ItfD = cast<ObjCInterfaceDecl>(GetDecl(Record[Idx++])); |