r298697 - [libclang] Bury dead TemporaryFiles
Krasimir Georgiev via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 24 02:49:54 PDT 2017
Author: krasimir
Date: Fri Mar 24 04:49:54 2017
New Revision: 298697
URL: http://llvm.org/viewvc/llvm-project?rev=298697&view=rev
Log:
[libclang] Bury dead TemporaryFiles
Summary:
AllocatedCXCodeCompleteResults::TemporaryFiles have turned into zombies.
Seven years ago they used to do their job during [[ https://github.com/llvm-mirror/clang/commit/313e26c4e81f0e467490a530548450f4c824a6c4/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
Modified:
cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
Modified: cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp?rev=298697&r1=298696&r2=298697&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp Fri Mar 24 04:49:54 2017
@@ -270,10 +270,6 @@ struct AllocatedCXCodeCompleteResults :
/// \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::~Allocat
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];
More information about the cfe-commits
mailing list