aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorMelanie Blower <melanie.blower@intel.com>2021-06-29 11:44:49 -0400
committerMelanie Blower <melanie.blower@intel.com>2021-06-29 13:26:23 -0400
commitaaba37187fda7f5a7fdc4c1e6129cbaaa1bbf709 (patch)
tree7d78ee2919d455919ef68878dea4c04bd21bd760 /clang/lib/Frontend/CompilerInstance.cpp
parent952944c12c0aa917e97805e929b5cd4e40866f91 (diff)
downloadllvm-aaba37187fda7f5a7fdc4c1e6129cbaaa1bbf709.zip
llvm-aaba37187fda7f5a7fdc4c1e6129cbaaa1bbf709.tar.gz
llvm-aaba37187fda7f5a7fdc4c1e6129cbaaa1bbf709.tar.bz2
[clang][PATCH][nfc] Refactor TargetInfo::adjust to pass DiagnosticsEngine to allow diagnostics on target-unsupported options
Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D104729
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 0633841..2ae3be6 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -142,7 +142,7 @@ bool CompilerInstance::createTarget() {
// 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.
- getTarget().adjust(getLangOpts());
+ getTarget().adjust(getDiagnostics(), getLangOpts());
// Adjust target options based on codegen options.
getTarget().adjustTargetOptions(getCodeGenOpts(), getTargetOpts());
@@ -457,7 +457,7 @@ void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) {
getSourceManager(), *HeaderInfo, *this,
/*IdentifierInfoLookup=*/nullptr,
/*OwnsHeaderSearch=*/true, TUKind);
- getTarget().adjust(getLangOpts());
+ getTarget().adjust(getDiagnostics(), getLangOpts());
PP->Initialize(getTarget(), getAuxTarget());
if (PPOpts.DetailedRecord)