diff options
author | David Blaikie <dblaikie@gmail.com> | 2017-01-05 19:11:36 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2017-01-05 19:11:36 +0000 |
commit | e3041688531925319b16b89e183e8ef275e2aeb0 (patch) | |
tree | 1d7e5462f2cea98fb96423848698008a6741920e /clang/lib/Frontend/ASTUnit.cpp | |
parent | f95113dacf2b16a74dfb034a9cc32ba08cade14d (diff) | |
download | bcm5719-llvm-e3041688531925319b16b89e183e8ef275e2aeb0.tar.gz bcm5719-llvm-e3041688531925319b16b89e183e8ef275e2aeb0.zip |
Move PreprocessorOptions to std::shared_ptr from IntrusiveRefCntPtr
llvm-svn: 291160
Diffstat (limited to 'clang/lib/Frontend/ASTUnit.cpp')
-rw-r--r-- | clang/lib/Frontend/ASTUnit.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index 5a88bc4083a..760918c9088 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -683,7 +683,7 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile( AST->ASTFileLangOpts, /*Target=*/nullptr)); - PreprocessorOptions *PPOpts = new PreprocessorOptions(); + auto PPOpts = std::make_shared<PreprocessorOptions>(); for (const auto &RemappedFile : RemappedFiles) PPOpts->addRemappedFile(RemappedFile.first, RemappedFile.second); @@ -693,11 +693,11 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile( HeaderSearch &HeaderInfo = *AST->HeaderInfo; unsigned Counter; - AST->PP = - new Preprocessor(PPOpts, AST->getDiagnostics(), AST->ASTFileLangOpts, - AST->getSourceManager(), HeaderInfo, *AST, - /*IILookup=*/nullptr, - /*OwnsHeaderSearch=*/false); + AST->PP = new Preprocessor(std::move(PPOpts), AST->getDiagnostics(), + AST->ASTFileLangOpts, AST->getSourceManager(), + HeaderInfo, *AST, + /*IILookup=*/nullptr, + /*OwnsHeaderSearch=*/false); Preprocessor &PP = *AST->PP; AST->Ctx = new ASTContext(AST->ASTFileLangOpts, AST->getSourceManager(), |