Use non-intrusive refcounting for TargetOptions
llvm-svn: 212388
diff --git a/clang/unittests/Lex/PPCallbacksTest.cpp b/clang/unittests/Lex/PPCallbacksTest.cpp
index c5fd570..a1af754 100644
--- a/clang/unittests/Lex/PPCallbacksTest.cpp
+++ b/clang/unittests/Lex/PPCallbacksTest.cpp
@@ -116,14 +116,12 @@
class PPCallbacksTest : public ::testing::Test {
protected:
PPCallbacksTest()
- : FileMgr(FileMgrOpts),
- DiagID(new DiagnosticIDs()),
- DiagOpts(new DiagnosticOptions()),
- Diags(DiagID, DiagOpts.get(), new IgnoringDiagConsumer()),
- SourceMgr(Diags, FileMgr) {
- TargetOpts = new TargetOptions();
+ : FileMgr(FileMgrOpts), DiagID(new DiagnosticIDs()),
+ DiagOpts(new DiagnosticOptions()),
+ Diags(DiagID, DiagOpts.get(), new IgnoringDiagConsumer()),
+ SourceMgr(Diags, FileMgr), TargetOpts(new TargetOptions()) {
TargetOpts->Triple = "x86_64-apple-darwin11.1.0";
- Target = TargetInfo::CreateTargetInfo(Diags, &*TargetOpts);
+ Target = TargetInfo::CreateTargetInfo(Diags, TargetOpts);
}
FileSystemOptions FileMgrOpts;
@@ -133,7 +131,7 @@
DiagnosticsEngine Diags;
SourceManager SourceMgr;
LangOptions LangOpts;
- IntrusiveRefCntPtr<TargetOptions> TargetOpts;
+ std::shared_ptr<TargetOptions> TargetOpts;
IntrusiveRefCntPtr<TargetInfo> Target;
// Register a header path as a known file and add its location