diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-10-17 00:11:35 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-10-17 00:11:35 +0000 |
commit | 07f8cf4ec3ffb6668b35e7b864354faa76167209 (patch) | |
tree | 6b4e93839df296434d5b767d35c3d086dc5b1905 /unittests/Basic/SourceManagerTest.cpp | |
parent | 16de3db5bb059c5274e75a788581b8123c05762a (diff) |
Fix the handling of target options in our unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Basic/SourceManagerTest.cpp')
-rw-r--r-- | unittests/Basic/SourceManagerTest.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/unittests/Basic/SourceManagerTest.cpp b/unittests/Basic/SourceManagerTest.cpp index de3b72318c..a04539b1ba 100644 --- a/unittests/Basic/SourceManagerTest.cpp +++ b/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; }; |