From: David Blaikie Date: Thu, 5 Jan 2017 19:11:31 +0000 (+0000) Subject: Move FailedModulesSet over to shared_ptr from IntrusiveRefCntPtr X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d214e3d43664b46113236bba05b1d64d80eff0b8;p=clang Move FailedModulesSet over to shared_ptr from IntrusiveRefCntPtr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291159 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Lex/PreprocessorOptions.h b/include/clang/Lex/PreprocessorOptions.h index de652cccb8..a2e1f7cb93 100644 --- a/include/clang/Lex/PreprocessorOptions.h +++ b/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/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index fea444715d..9c4c2a67b9 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/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.