forked from OSchip/llvm-project
[libclang] Bury dead TemporaryFiles
Summary:
AllocatedCXCodeCompleteResults::TemporaryFiles have turned into zombies.
Seven years ago they used to do their job during [[ 313e26c4e8/tools/CIndex/CIndexCodeCompletion.cpp (diff-02d3e692ad507b10af9458b775c5750bL261)
| file remapping]], but now they are created just to be torn down in the destructor.
Reviewers: bkramer
Reviewed By: bkramer
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D31288
llvm-svn: 298697
This commit is contained in:
parent
af4adfa3ad
commit
c4d5c25737
|
@ -270,10 +270,6 @@ struct AllocatedCXCodeCompleteResults : public CXCodeCompleteResults {
|
|||
/// \brief Source manager, used for diagnostics.
|
||||
IntrusiveRefCntPtr<SourceManager> SourceMgr;
|
||||
|
||||
/// \brief Temporary files that should be removed once we have finished
|
||||
/// with the code-completion results.
|
||||
std::vector<std::string> TemporaryFiles;
|
||||
|
||||
/// \brief Temporary buffers that will be deleted once we have finished with
|
||||
/// the code-completion results.
|
||||
SmallVector<const llvm::MemoryBuffer *, 1> TemporaryBuffers;
|
||||
|
@ -335,8 +331,6 @@ AllocatedCXCodeCompleteResults::~AllocatedCXCodeCompleteResults() {
|
|||
llvm::DeleteContainerPointers(DiagnosticsWrappers);
|
||||
delete [] Results;
|
||||
|
||||
for (unsigned I = 0, N = TemporaryFiles.size(); I != N; ++I)
|
||||
llvm::sys::fs::remove(TemporaryFiles[I]);
|
||||
for (unsigned I = 0, N = TemporaryBuffers.size(); I != N; ++I)
|
||||
delete TemporaryBuffers[I];
|
||||
|
||||
|
|
Loading…
Reference in New Issue