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
This commit is contained in:
Douglas Gregor 2012-10-17 00:11:35 +00:00
Родитель 16de3db5bb
Коммит 07f8cf4ec3
3 изменённых файлов: 17 добавлений и 12 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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