summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Basic/SourceManagerTest.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-10-17 00:11:35 +0000
committerDouglas Gregor <dgregor@apple.com>2012-10-17 00:11:35 +0000
commit44d6361ed76785b907992fda2639e55092a253cb (patch)
tree1988aa9e0266c5675a251bf69fbb158165514ca7 /clang/unittests/Basic/SourceManagerTest.cpp
parent667f95395f27ec5a060ab67c19c5090e517b19ff (diff)
downloadbcm5719-llvm-44d6361ed76785b907992fda2639e55092a253cb.tar.gz
bcm5719-llvm-44d6361ed76785b907992fda2639e55092a253cb.zip
Fix the handling of target options in our unit tests.
llvm-svn: 166079
Diffstat (limited to 'clang/unittests/Basic/SourceManagerTest.cpp')
-rw-r--r--clang/unittests/Basic/SourceManagerTest.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/unittests/Basic/SourceManagerTest.cpp b/clang/unittests/Basic/SourceManagerTest.cpp
index de3b72318cc..a04539b1bad 100644
--- a/clang/unittests/Basic/SourceManagerTest.cpp
+++ b/clang/unittests/Basic/SourceManagerTest.cpp
@@ -33,9 +33,10 @@ protected:
: FileMgr(FileMgrOpts),
DiagID(new DiagnosticIDs()),
Diags(DiagID, new IgnoringDiagConsumer()),
- SourceMgr(Diags, FileMgr) {
- TargetOpts.Triple = "x86_64-apple-darwin11.1.0";
- Target = TargetInfo::CreateTargetInfo(Diags, TargetOpts);
+ SourceMgr(Diags, FileMgr),
+ TargetOpts(new TargetOptions) {
+ TargetOpts->Triple = "x86_64-apple-darwin11.1.0";
+ Target = TargetInfo::CreateTargetInfo(Diags, *TargetOpts);
}
FileSystemOptions FileMgrOpts;
@@ -44,7 +45,7 @@ protected:
DiagnosticsEngine Diags;
SourceManager SourceMgr;
LangOptions LangOpts;
- TargetOptions TargetOpts;
+ IntrusiveRefCntPtr<TargetOptions> TargetOpts;
IntrusiveRefCntPtr<TargetInfo> Target;
};
OpenPOWER on IntegriCloud