anchor the vtable to Parser.cpp for good measure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85927
91177308-0d34-0410-b5e6-
96231b3b80d8
struct FieldCallback {
virtual DeclPtrTy invoke(FieldDeclarator &Field) = 0;
+ virtual ~FieldCallback() {}
+
+ private:
+ virtual void _anchor();
};
void ParseStructDeclaration(DeclSpec &DS, FieldCallback &Callback);
PP.AnnotateCachedTokens(Tok);
return true;
}
+
+// Anchor the Parser::FieldCallback vtable to this translation unit.
+// We use a spurious method instead of the destructor because
+// destroying FieldCallbacks can actually be slightly
+// performance-sensitive.
+void Parser::FieldCallback::_anchor() {
+}