diff options
author | David Blaikie <dblaikie@gmail.com> | 2017-01-06 17:47:10 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2017-01-06 17:47:10 +0000 |
commit | 81d08294384d968ebbc2d0584d1b987f1a8a01b3 (patch) | |
tree | f74908be6ffd56b83252c5430c5b855be2f10c1e /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 3128d6b520c7c43dacd6efb60464ba5318e88feb (diff) | |
download | bcm5719-llvm-81d08294384d968ebbc2d0584d1b987f1a8a01b3.tar.gz bcm5719-llvm-81d08294384d968ebbc2d0584d1b987f1a8a01b3.zip |
Revert "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and CodeCompleteConsumer"
Caused a memory leak reported by asan. Reverting while I investigate.
This reverts commit r291184.
llvm-svn: 291249
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 93bbcc42da1..86d58a24317 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -60,11 +60,12 @@ CompilerInvocationBase::CompilerInvocationBase() PreprocessorOpts(new PreprocessorOptions()) {} CompilerInvocationBase::CompilerInvocationBase(const CompilerInvocationBase &X) - : LangOpts(new LangOptions(*X.getLangOpts())), - TargetOpts(new TargetOptions(X.getTargetOpts())), - DiagnosticOpts(new DiagnosticOptions(X.getDiagnosticOpts())), - HeaderSearchOpts(new HeaderSearchOptions(X.getHeaderSearchOpts())), - PreprocessorOpts(new PreprocessorOptions(X.getPreprocessorOpts())) {} + : RefCountedBase<CompilerInvocation>(), + LangOpts(new LangOptions(*X.getLangOpts())), + TargetOpts(new TargetOptions(X.getTargetOpts())), + DiagnosticOpts(new DiagnosticOptions(X.getDiagnosticOpts())), + HeaderSearchOpts(new HeaderSearchOptions(X.getHeaderSearchOpts())), + PreprocessorOpts(new PreprocessorOptions(X.getPreprocessorOpts())) {} CompilerInvocationBase::~CompilerInvocationBase() {} |