Move FailedModulesSet over to shared_ptr from IntrusiveRefCntPtr

llvm-svn: 291159
This commit is contained in:
David Blaikie 2017-01-05 19:11:31 +00:00
parent a8bf97569a
commit f95113dacf
2 changed files with 4 additions and 3 deletions

View File

@ -117,7 +117,7 @@ public:
ObjCXXARCStandardLibraryKind ObjCXXARCStandardLibrary;
/// \brief Records the set of modules
class FailedModulesSet : public RefCountedBase<FailedModulesSet> {
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<FailedModulesSet> FailedModules;
std::shared_ptr<FailedModulesSet> FailedModules;
public:
PreprocessorOptions() : UsePredefines(true), DetailedRecord(false),

View File

@ -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<PreprocessorOptions::FailedModulesSet>();
PPOpts.FailedModules = ImportingPPOpts.FailedModules;
// If there is a module map file, build the module using the module map.