diff options
author | Manuel Klimek <klimek@google.com> | 2015-12-16 15:48:58 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2015-12-16 15:48:58 +0000 |
commit | 66a4dae57f01f9d29d75ad71aa69e665d5cb676c (patch) | |
tree | c859a83f113df83ec773cee0733d6d73a058ac09 /clang | |
parent | 2a538309ac210cfc15bf7d351cd4588ecd7cacbf (diff) | |
download | bcm5719-llvm-66a4dae57f01f9d29d75ad71aa69e665d5cb676c.tar.gz bcm5719-llvm-66a4dae57f01f9d29d75ad71aa69e665d5cb676c.zip |
Make matchers thread compatible, so we can pass them to different threads and run them on multiple translation units in parallel.
llvm-svn: 255773
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/ASTMatchers/ASTMatchersInternal.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/include/clang/ASTMatchers/ASTMatchersInternal.h b/clang/include/clang/ASTMatchers/ASTMatchersInternal.h index 55839c53b45..22068b48e79 100644 --- a/clang/include/clang/ASTMatchers/ASTMatchersInternal.h +++ b/clang/include/clang/ASTMatchers/ASTMatchersInternal.h @@ -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 |