From f95113dacf2b16a74dfb034a9cc32ba08cade14d Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 5 Jan 2017 19:11:31 +0000 Subject: [PATCH] Move FailedModulesSet over to shared_ptr from IntrusiveRefCntPtr llvm-svn: 291159 --- clang/include/clang/Lex/PreprocessorOptions.h | 4 ++-- clang/lib/Frontend/CompilerInstance.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/clang/include/clang/Lex/PreprocessorOptions.h b/clang/include/clang/Lex/PreprocessorOptions.h index de652cccb83a..a2e1f7cb9396 100644 --- a/clang/include/clang/Lex/PreprocessorOptions.h +++ b/clang/include/clang/Lex/PreprocessorOptions.h @@ -117,7 +117,7 @@ public: ObjCXXARCStandardLibraryKind ObjCXXARCStandardLibrary; /// \brief Records the set of modules - class FailedModulesSet : public RefCountedBase { + class FailedModulesSet { llvm::StringSet<> Failed; public: @@ -136,7 +136,7 @@ public: /// to (re)build modules, so that once a module fails to build anywhere, /// other instances will see that the module has failed and won't try to /// build it again. - IntrusiveRefCntPtr FailedModules; + std::shared_ptr FailedModules; public: PreprocessorOptions() : UsePredefines(true), DetailedRecord(false), diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index fea444715dbc..9c4c2a67b9c6 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1049,7 +1049,8 @@ static bool compileModuleImpl(CompilerInstance &ImportingInstance, PreprocessorOptions &ImportingPPOpts = ImportingInstance.getInvocation().getPreprocessorOpts(); if (!ImportingPPOpts.FailedModules) - ImportingPPOpts.FailedModules = new PreprocessorOptions::FailedModulesSet; + ImportingPPOpts.FailedModules = + std::make_shared(); PPOpts.FailedModules = ImportingPPOpts.FailedModules; // If there is a module map file, build the module using the module map.