summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReaderDecl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-10-15 03:50:32 +0000
committerJohn McCall <rjmccall@apple.com>2009-10-15 03:50:32 +0000
commit33815690af25a41f6739ff9a5cc71bde389f2363 (patch)
tree71cd77e97d60c5143c2aaf6a11a6aea1071e2cdb /clang/lib/Frontend/PCHReaderDecl.cpp
parentbf186694b0840670c02242c54d16faa2abe9e945 (diff)
downloadbcm5719-llvm-33815690af25a41f6739ff9a5cc71bde389f2363.tar.gz
bcm5719-llvm-33815690af25a41f6739ff9a5cc71bde389f2363.zip
Better living through metaprogramming. Create a base class which abstracts
most of the unsafe boilerplate out of TypeLoc. Create a QualifiedLoc class to represent the idea that we *might* start representing source locations of qualifiers. Dealing with qualifiers explicitly like this also lets us efficiently ignore them in all the concrete cases. This should make it obvious and easy to add new TypeLoc subclasses. llvm-svn: 84168
Diffstat (limited to 'clang/lib/Frontend/PCHReaderDecl.cpp')
-rw-r--r--clang/lib/Frontend/PCHReaderDecl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PCHReaderDecl.cpp b/clang/lib/Frontend/PCHReaderDecl.cpp
index 353a6464b18..b6732561dff 100644
--- a/clang/lib/Frontend/PCHReaderDecl.cpp
+++ b/clang/lib/Frontend/PCHReaderDecl.cpp
@@ -162,7 +162,7 @@ public:
: Reader(Reader), Record(Record), Idx(Idx) { }
#define ABSTRACT_TYPELOC(CLASS)
-#define TYPELOC(CLASS, PARENT, TYPE) \
+#define TYPELOC(CLASS, PARENT) \
void Visit##CLASS(CLASS TyLoc);
#include "clang/AST/TypeLocNodes.def"
@@ -173,6 +173,9 @@ public:
}
+void TypeLocReader::VisitQualifiedLoc(QualifiedLoc TyLoc) {
+ // nothing to do
+}
void TypeLocReader::VisitDefaultTypeSpecLoc(DefaultTypeSpecLoc TyLoc) {
TyLoc.setStartLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
}
OpenPOWER on IntegriCloud