diff options
author | David Blaikie <dblaikie@gmail.com> | 2017-01-05 18:51:54 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2017-01-05 18:51:54 +0000 |
commit | e8ba82c403e7c512ff62afac75950e5fbf990526 (patch) | |
tree | b9534e2d8382097275eac0fa75315bb9db7816f8 /include/clang/ASTMatchers | |
parent | 88c7b76b1033506e286aab7ba0a4ee66e906eb5e (diff) |
Move VariantMatcher's Payload to std::shared_ptr rather than IntrusiveRefCntPtr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291156 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/ASTMatchers')
-rw-r--r-- | include/clang/ASTMatchers/Dynamic/VariantValue.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/clang/ASTMatchers/Dynamic/VariantValue.h b/include/clang/ASTMatchers/Dynamic/VariantValue.h index 9f694d0ce4..2c80b51373 100644 --- a/include/clang/ASTMatchers/Dynamic/VariantValue.h +++ b/include/clang/ASTMatchers/Dynamic/VariantValue.h @@ -119,7 +119,7 @@ class VariantMatcher { /// \brief Payload interface to be specialized by each matcher type. /// /// It follows a similar interface as VariantMatcher itself. - class Payload : public RefCountedBase<Payload> { + class Payload { public: virtual ~Payload(); virtual llvm::Optional<DynTypedMatcher> getSingleMatcher() const = 0; @@ -208,7 +208,8 @@ public: std::string getTypeAsString() const; private: - explicit VariantMatcher(Payload *Value) : Value(Value) {} + explicit VariantMatcher(std::shared_ptr<Payload> Value) + : Value(std::move(Value)) {} template <typename T> struct TypedMatcherOps; @@ -216,7 +217,7 @@ private: class PolymorphicPayload; class VariadicOpPayload; - IntrusiveRefCntPtr<const Payload> Value; + std::shared_ptr<const Payload> Value; }; template <typename T> |