diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-03-21 18:40:17 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-03-21 18:40:17 +0000 |
commit | 4f32786ac45210143654390177105eb749b614e9 (patch) | |
tree | 289b0c67da849bf045e5c03605f9fbfc80c23d01 /include/clang/Basic/SourceManager.h | |
parent | cd1eecfe4f43a542c8f9a6e7d12fa69b28c23a67 (diff) |
Improve crash recovery cleanup to recovery CompilerInstances during crash recovery. This was a huge resource "root" during crashes.
This change requires making a bunch of fundamental Clang structures (optionally) reference counted to allow correct
ownership semantics of these objects (e.g., ASTContext) to play out between an active ASTUnit and CompilerInstance
object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index 799ee3438f..4c8a805538 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -19,6 +19,7 @@ #include "llvm/Support/DataTypes.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/PointerUnion.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/DenseMap.h" #include <vector> #include <cassert> @@ -378,7 +379,7 @@ public: /// user's view. In the case of a macro expansion, for example, the spelling /// location indicates where the expanded token came from and the instantiation /// location specifies where it was expanded. -class SourceManager { +class SourceManager : public llvm::RefCountedBase<SourceManager> { /// \brief Diagnostic object. Diagnostic &Diag; |