]> granicus.if.org Git - clang/commitdiff
Move FailedModulesSet over to shared_ptr from IntrusiveRefCntPtr
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 5 Jan 2017 19:11:31 +0000 (19:11 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 5 Jan 2017 19:11:31 +0000 (19:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291159 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Lex/PreprocessorOptions.h
lib/Frontend/CompilerInstance.cpp

index de652cccb83ae958dd554859aaebf9cdb3d0f4b0..a2e1f7cb939620661e89eb1a349868bcee723ce7 100644 (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),
index fea444715dbcd9fa6798e8fdd2dd2516a46b86b7..9c4c2a67b9c68cf5e0e51077d7619ff6d4263be2 100644 (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.