From 7e2c2030143f135227afa1933b81bb6ff0c7f047 Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Wed, 16 Dec 2015 15:48:58 +0000 Subject: [PATCH] Make matchers thread compatible, so we can pass them to different threads and run them on multiple translation units in parallel. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255773 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/ASTMatchers/ASTMatchersInternal.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/clang/ASTMatchers/ASTMatchersInternal.h b/include/clang/ASTMatchers/ASTMatchersInternal.h index 55839c53b4..22068b48e7 100644 --- a/include/clang/ASTMatchers/ASTMatchersInternal.h +++ b/include/clang/ASTMatchers/ASTMatchersInternal.h @@ -188,8 +188,11 @@ class ASTMatchFinder; /// Used by the implementation of Matcher and DynTypedMatcher. /// In general, implement MatcherInterface or SingleNodeMatcherInterface /// instead. -class DynMatcherInterface : public RefCountedBaseVPTR { +class DynMatcherInterface + : public llvm::ThreadSafeRefCountedBase { public: + virtual ~DynMatcherInterface() {} + /// \brief Returns true if \p DynNode can be matched. /// /// May bind \p DynNode to an ID via \p Builder, or recurse into @@ -209,8 +212,6 @@ public: template class MatcherInterface : public DynMatcherInterface { public: - ~MatcherInterface() override {} - /// \brief Returns true if 'Node' can be matched. /// /// May bind 'Node' to an ID via 'Builder', or recurse into -- 2.40.0