Fix the handling of target options in our unit tests.

llvm-svn: 166079
This commit is contained in:
Douglas Gregor 2012-10-17 00:11:35 +00:00
parent 667f95395f
commit 44d6361ed7
3 changed files with 17 additions and 12 deletions

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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;
};