Author: klimek Date: Wed Dec 16 09:48:58 2015 New Revision: 255773 URL: http://llvm.org/viewvc/llvm-project?rev=255773&view=rev Log: Make matchers thread compatible, so we can pass them to different threads and run them on multiple translation units in parallel.
Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h?rev=255773&r1=255772&r2=255773&view=diff ============================================================================== --- cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h (original) +++ cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h Wed Dec 16 09:48:58 2015 @@ -188,8 +188,11 @@ class ASTMatchFinder; /// Used by the implementation of Matcher<T> and DynTypedMatcher. /// In general, implement MatcherInterface<T> or SingleNodeMatcherInterface<T> /// instead. -class DynMatcherInterface : public RefCountedBaseVPTR { +class DynMatcherInterface + : public llvm::ThreadSafeRefCountedBase<DynMatcherInterface> { 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 <typename T> 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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits