aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriterDecl.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
commit34a0447b8072e0da14c0980597da9d03a1495662 (patch)
tree79b17d32f32a440eac48e8739cd172424123cbf8 /lib/Frontend/PCHWriterDecl.cpp
parent6d8b16ca9cb7b494fa8887c5e5359fa429c809e6 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84168 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriterDecl.cpp')
-rw-r--r--lib/Frontend/PCHWriterDecl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp
index 4527bb1f90..ef7c5ec4b1 100644
--- a/lib/Frontend/PCHWriterDecl.cpp
+++ b/lib/Frontend/PCHWriterDecl.cpp
@@ -160,7 +160,7 @@ public:
: Writer(Writer), Record(Record) { }
#define ABSTRACT_TYPELOC(CLASS)
-#define TYPELOC(CLASS, PARENT, TYPE) \
+#define TYPELOC(CLASS, PARENT) \
void Visit##CLASS(CLASS TyLoc);
#include "clang/AST/TypeLocNodes.def"
@@ -171,6 +171,9 @@ public:
}
+void TypeLocWriter::VisitQualifiedLoc(QualifiedLoc TyLoc) {
+ // nothing to do here
+}
void TypeLocWriter::VisitDefaultTypeSpecLoc(DefaultTypeSpecLoc TyLoc) {
Writer.AddSourceLocation(TyLoc.getStartLoc(), Record);
}