]> granicus.if.org Git - clang/commitdiff
Make matchers thread compatible, so we can pass them to different threads and run...
authorManuel Klimek <klimek@google.com>
Wed, 16 Dec 2015 15:48:58 +0000 (15:48 +0000)
committerManuel Klimek <klimek@google.com>
Wed, 16 Dec 2015 15:48:58 +0000 (15:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255773 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/ASTMatchers/ASTMatchersInternal.h

index 55839c53b4541438c930fd60d7c8c77aa044dedf..22068b48e7992a480bd7656aa16ff21c74ed736c 100644 (file)
@@ -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