aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-11-03 19:33:12 +0000
committerJohn McCall <rjmccall@apple.com>2009-11-03 19:33:12 +0000
commit6c94a6d77f456f23ecd4c2061e6413786b5e6571 (patch)
treea31ba991d0398b4b73f6489fe05b06e9a046fce8 /lib/Parse/Parser.cpp
parent62db245427b1cfb64cc0a25c918e17489a4a039c (diff)
Silence a warning by giving Parser::FieldCallback a virtual destructor, and
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
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r--lib/Parse/Parser.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index e69cb72a0a..cc4aec6297 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -1019,3 +1019,10 @@ bool Parser::TryAnnotateCXXScopeToken(bool EnteringContext) {
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() {
+}