From: Manuel Klimek Date: Wed, 16 Dec 2015 15:48:58 +0000 (+0000) Subject: Make matchers thread compatible, so we can pass them to different threads and run... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e2c2030143f135227afa1933b81bb6ff0c7f047;p=clang 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 --- 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