summaryrefslogtreecommitdiff
path: root/unittests/Lex
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Lex')
-rw-r--r--unittests/Lex/LexerTest.cpp10
-rw-r--r--unittests/Lex/PreprocessingRecordTest.cpp10
2 files changed, 12 insertions, 8 deletions
diff --git a/unittests/Lex/LexerTest.cpp b/unittests/Lex/LexerTest.cpp
index e43ad86ff5..069b3ccff9 100644
--- a/unittests/Lex/LexerTest.cpp
+++ b/unittests/Lex/LexerTest.cpp
@@ -32,9 +32,11 @@ 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;
@@ -43,7 +45,7 @@ protected:
DiagnosticsEngine Diags;
SourceManager SourceMgr;
LangOptions LangOpts;
- TargetOptions TargetOpts;
+ IntrusiveRefCntPtr<TargetOptions> TargetOpts;
IntrusiveRefCntPtr<TargetInfo> Target;
};
diff --git a/unittests/Lex/PreprocessingRecordTest.cpp b/unittests/Lex/PreprocessingRecordTest.cpp
index 5b5d933d1b..e9898cabfe 100644
--- a/unittests/Lex/PreprocessingRecordTest.cpp
+++ b/unittests/Lex/PreprocessingRecordTest.cpp
@@ -33,9 +33,11 @@ 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 +46,7 @@ protected:
DiagnosticsEngine Diags;
SourceManager SourceMgr;
LangOptions LangOpts;
- TargetOptions TargetOpts;
+ IntrusiveRefCntPtr<TargetOptions> TargetOpts;
IntrusiveRefCntPtr<TargetInfo> Target;
};