diff options
Diffstat (limited to 'clang/lib/Frontend/PrecompiledPreamble.cpp')
-rw-r--r-- | clang/lib/Frontend/PrecompiledPreamble.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/clang/lib/Frontend/PrecompiledPreamble.cpp b/clang/lib/Frontend/PrecompiledPreamble.cpp index 77b93713ce68..af82ab3f5558 100644 --- a/clang/lib/Frontend/PrecompiledPreamble.cpp +++ b/clang/lib/Frontend/PrecompiledPreamble.cpp @@ -365,17 +365,9 @@ llvm::ErrorOr<PrecompiledPreamble> PrecompiledPreamble::Build( Clang->setDiagnostics(&Diagnostics); // Create the target instance. - Clang->setTarget(TargetInfo::CreateTargetInfo( - Clang->getDiagnostics(), Clang->getInvocation().TargetOpts)); - if (!Clang->hasTarget()) + if (!Clang->createTarget()) return BuildPreambleError::CouldntCreateTargetInfo; - // Inform the target of the language options. - // - // FIXME: We shouldn't need to do this, the target should be immutable once - // created. This complexity should be lifted elsewhere. - Clang->getTarget().adjust(Clang->getLangOpts()); - if (Clang->getFrontendOpts().Inputs.size() != 1 || Clang->getFrontendOpts().Inputs[0].getKind().getFormat() != InputKind::Source || |