diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:13:35 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:13:35 +0000 |
commit | 6694ed095d6b27a2c92ec4fd63664fcd88a05749 (patch) | |
tree | 0633c29bd8350e306f3a24a30f3f6045efd35420 /include/clang/Sema/CodeCompleteConsumer.h | |
parent | d5dc75c5cf109efe52b1da32ec44a667389a0f0a (diff) |
Diffstat (limited to 'include/clang/Sema/CodeCompleteConsumer.h')
-rw-r--r-- | include/clang/Sema/CodeCompleteConsumer.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h index b80924ea11fc..dee53dc14a8c 100644 --- a/include/clang/Sema/CodeCompleteConsumer.h +++ b/include/clang/Sema/CodeCompleteConsumer.h @@ -509,23 +509,18 @@ public: }; /// \brief Allocator for a cached set of global code completions. -class GlobalCodeCompletionAllocator - : public CodeCompletionAllocator, - public RefCountedBase<GlobalCodeCompletionAllocator> -{ - -}; +class GlobalCodeCompletionAllocator : public CodeCompletionAllocator {}; class CodeCompletionTUInfo { llvm::DenseMap<const DeclContext *, StringRef> ParentNames; - IntrusiveRefCntPtr<GlobalCodeCompletionAllocator> AllocatorRef; + std::shared_ptr<GlobalCodeCompletionAllocator> AllocatorRef; public: explicit CodeCompletionTUInfo( - IntrusiveRefCntPtr<GlobalCodeCompletionAllocator> Allocator) + std::shared_ptr<GlobalCodeCompletionAllocator> Allocator) : AllocatorRef(std::move(Allocator)) {} - IntrusiveRefCntPtr<GlobalCodeCompletionAllocator> getAllocatorRef() const { + std::shared_ptr<GlobalCodeCompletionAllocator> getAllocatorRef() const { return AllocatorRef; } CodeCompletionAllocator &getAllocator() const { @@ -965,8 +960,8 @@ public: /// results to the given raw output stream. PrintingCodeCompleteConsumer(const CodeCompleteOptions &CodeCompleteOpts, raw_ostream &OS) - : CodeCompleteConsumer(CodeCompleteOpts, false), OS(OS), - CCTUInfo(new GlobalCodeCompletionAllocator) {} + : CodeCompleteConsumer(CodeCompleteOpts, false), OS(OS), + CCTUInfo(std::make_shared<GlobalCodeCompletionAllocator>()) {} /// \brief Prints the finalized code-completion results. void ProcessCodeCompleteResults(Sema &S, CodeCompletionContext Context, |