Create a special allocator class for code completion, so that all of
the string copying goes through a single place that can have associated state. llvm-svn: 124698
This commit is contained in:
@@ -230,7 +230,7 @@ struct AllocatedCXCodeCompleteResults : public CXCodeCompleteResults {
|
||||
llvm::SmallVector<const llvm::MemoryBuffer *, 1> TemporaryBuffers;
|
||||
|
||||
/// \brief Allocator used to store code completion results.
|
||||
llvm::BumpPtrAllocator CodeCompletionAllocator;
|
||||
CodeCompletionAllocator CodeCompletionAllocator;
|
||||
};
|
||||
|
||||
/// \brief Tracks the number of code-completion result objects that are
|
||||
@@ -310,7 +310,7 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
virtual llvm::BumpPtrAllocator &getAllocator() {
|
||||
virtual CodeCompletionAllocator &getAllocator() {
|
||||
return AllocatedResults.CodeCompletionAllocator;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user