summaryrefslogtreecommitdiffstats
path: root/include/clang/ASTMatchers
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-01-05 18:51:54 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-01-05 18:51:54 +0000
commite8ba82c403e7c512ff62afac75950e5fbf990526 (patch)
treeb9534e2d8382097275eac0fa75315bb9db7816f8 /include/clang/ASTMatchers
parent88c7b76b1033506e286aab7ba0a4ee66e906eb5e (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.h7
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>