summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-01-05 19:11:31 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-01-05 19:11:31 +0000
commitf95113dacf2b16a74dfb034a9cc32ba08cade14d (patch)
tree8dad9161d4279dc0f5eaad3b7b2a770f601559ac /clang
parenta8bf97569a46440727d45d91819d38b340a217d3 (diff)
downloadbcm5719-llvm-f95113dacf2b16a74dfb034a9cc32ba08cade14d.tar.gz
bcm5719-llvm-f95113dacf2b16a74dfb034a9cc32ba08cade14d.zip
Move FailedModulesSet over to shared_ptr from IntrusiveRefCntPtr
llvm-svn: 291159
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Lex/PreprocessorOptions.h4
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/clang/include/clang/Lex/PreprocessorOptions.h b/clang/include/clang/Lex/PreprocessorOptions.h
index de652cccb83..a2e1f7cb939 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<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),
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index fea444715db..9c4c2a67b9c 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<PreprocessorOptions::FailedModulesSet>();
PPOpts.FailedModules = ImportingPPOpts.FailedModules;
// If there is a module map file, build the module using the module map.
OpenPOWER on IntegriCloud